forked from bencodezen/vue-enterprise-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
26 lines (25 loc) · 828 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
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,
},
// Configure Webpack's dev server.
// https://github.com/vuejs/vue-cli/blob/dev/docs/cli-service.md
devServer: {
...(process.env.API_BASE_URL
? // Proxy API endpoints to the production base URL.
{ proxy: { '/api': { target: process.env.API_BASE_URL } } }
: // Proxy API endpoints a local mock API.
{ before: require('./tests/mock-api') }),
},
}