forked from bencodezen/vue-enterprise-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
34 lines (33 loc) · 892 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
const appConfig = require('./src/app.config')
module.exports = {
configureWebpack: {
// We provide the app's title in Webpack's name field, so that
// it can be accessed in index.html to inject the correct title.
name: appConfig.title,
// Set up all the aliases we use in our app.
resolve: {
alias: require('./aliases.config').webpack,
},
},
css: {
// Enable CSS source maps.
sourceMap: true,
// Enable CSS modules for all CSS/pre-processor files.
// This option does not affect *.vue files.
modules: true,
},
// Split vendors using autoDLLPlugin.
dll: true,
...(process.env.PROD_API
? {
proxy: {
'/api': appConfig.prod.baseUrl,
},
}
: {
devServer: {
// Provide a mock API for development and tests
before: require('./tests/mock-api'),
},
}),
}