-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpoi.config.js
More file actions
46 lines (43 loc) · 1.09 KB
/
poi.config.js
File metadata and controls
46 lines (43 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const path = require('path');
const root = path.resolve(__dirname);
module.exports = {
entry: 'src/index.js',
output: {
dir: 'build/',
clean: true,
html: {
template: './index.html',
},
},
plugins: [
{
resolve: '@poi/plugin-typescript',
options: {
vue: false,
},
},
{
resolve: '@poi/plugin-offline',
options: {},
},
{
resolve: '@poi/plugin-pwa',
options: {},
},
],
configureWebpack(config, context) {
config.resolve.extensions = [...config.resolve.extensions, '.tsx'];
config.resolve.alias = {
...config.resolve.alias,
Assets: path.resolve(root, 'assets'),
};
for (const rule of config.module.rules) {
if (rule.test.toString() !== /\.(svg)(\?.*)?$/.toString()) {
continue;
}
rule.use[0].loader = 'raw-loader';
rule.use[0].options = {};
}
return config;
},
};