blob: 551d1acc030bdf5e39507a38720817cbc53d1d50 (
plain)
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
|
const path = require('path')
const webpack = require('webpack')
function resolve (dir) {
return path.join(__dirname, dir)
}
module.exports = {
transpileDependencies: ['/@intlify'],
css: {
sourceMap: false // 开启浏览器调试css定位
},
chainWebpack: (config) => {
config.resolve.alias // 路径别名
.set('@', resolve('./src'))
config.plugin('webpack.DefinePlugin').use(new webpack.DefinePlugin({
__INTLIFY_PROD_DEVTOOLS__: JSON.stringify(false)
}))
},
lintOnSave: true,
devServer: {
port: 80
},
configureWebpack: {
module: {
rules: [
{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto'
}
]
}
}
}
|