-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
36 lines (35 loc) · 975 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
// Environment variables we can send to app
process.env.VUE_APP_VERSION = require('./package.json').version;
// Will reference androidBuild for both android and ios
process.env.VUE_APP_BUILD = require('./package.json').androidBuild;
// Flag for build visibility
process.env.VUE_APP_HIDEBUILD = require('./package.json').hideBuild;
module.exports = {
configureWebpack: config => {
if (process.env.NODE_ENV === 'development') {
config.devtool = 'source-map';
}
config.resolve.alias = require('./aliases.config').webpack;
},
chainWebpack: config => {
config.module
.rule('i18n')
.resourceQuery(/blockType=i18n/)
.type('javascript/auto')
.use('i18n')
.loader('@intlify/vue-i18n-loader')
.end();
},
pluginOptions: {
i18n: {
locale: 'en',
fallbackLocale: 'en',
localeDir: 'data/locales',
enableInSFC: true
}
},
css: {
// Enable CSS source maps.
sourceMap: true,
}
}