forked from CartoDB/cartodb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
42 lines (41 loc) · 1.21 KB
/
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
38
39
40
41
42
const path = require('path');
const { version } = require('./package.json');
module.exports = {
runtimeCompiler: true,
publicPath: '/spatial-data-catalog/browser/',
outputDir: path.resolve(__dirname, `public/assets/${version}/javascripts`),
configureWebpack: {
resolve: {
alias: {
'do-catalog': path.resolve(__dirname, 'lib/assets/javascripts/do-catalog/'),
'new-dashboard': path.resolve(__dirname, 'lib/assets/javascripts/new-dashboard/')
},
extensions: ['.js', '.vue', '.json', '.scss']
},
performance: {
maxEntrypointSize: 2048000,
maxAssetSize: 2048000
}
},
css: {
extract: false,
loaderOptions: {
scss: {
data: `@import 'do-catalog/main.scss';`
}
}
},
chainWebpack: config => {
if (process.env.NODE_ENV === 'production') {
config.module.rule('images').use('url-loader')
.loader('file-loader')
.tap(options => Object.assign(options, {
name: '../images/do-catalog/[name].[hash:8].[ext]'
}));
config.module.rule('svg').use('file-loader')
.tap(options => Object.assign(options, {
name: '../images/do-catalog/[name].[hash:8].[ext]'
}));
}
}
};