-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscfile.js
More file actions
41 lines (32 loc) · 1.04 KB
/
scfile.js
File metadata and controls
41 lines (32 loc) · 1.04 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
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
externals: {
vue: 'Vue'
},
resolveAlias: {
'packages': path.resolve(__dirname, '../packages')
// a list of module name aliases
// 'module': 'new-module',
// alias "module" -> "new-module" and "module/path/file" -> "new-module/path/file"
// 'only-module$': 'new-module',
// alias "only-module" -> "new-module", but not "only-module/path/file" -> "new-module/path/file"
// 'module': path.resolve(__dirname, 'app/third/module.js'),
// alias "module" -> "./app/third/module.js" and "module/file" results in error
// modules aliases are imported relative to the current context
},
babelEnvOptions: {
targets: {
chrome: 54
},
debug: true
}
}
Object.defineProperty(module.exports, 'install', {
value (webpackConfig, ctx) {
webpackConfig.plugins.push(new HtmlWebpackPlugin({
template: path.resolve(__dirname, 'index.tpl')
}))
return Promise.resolve(webpackConfig)
}
})