forked from dcloudio/uni-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
37 lines (32 loc) · 954 Bytes
/
vue.config.js
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
const path = require('path')
const resolve = dir => path.resolve(__dirname, '../', dir)
const pkgPath = resolve('package.json')
const webpackConfig = require('./webpack.config.js')
module.exports = {
publicPath: '/',
outputDir: resolve('./packages/uni-' + process.env.UNI_PLATFORM + '/dist'),
lintOnSave: true, // or error
runtimeCompiler: false,
transpileDependencies: [],
productionSourceMap: false,
configureWebpack: webpackConfig,
chainWebpack: config => {
config.devtool('source-map')
config.module
.rule('eslint')
.include
.add(resolve('src'))
.add(resolve('lib/' + process.env.UNI_PLATFORM))
.end()
.use('eslint-loader')
.loader(resolve('node_modules/eslint-loader'))
.options({
fix: true,
configFile: pkgPath
})
config.plugins.delete('hmr') // remove hot module reload
},
css: {
extract: true
}
}