-
-
Notifications
You must be signed in to change notification settings - Fork 848
/
vue.config.js
42 lines (42 loc) · 1.31 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
module.exports = {
// Output to standard directory; this is then compiled by django collectstatic
outputDir: './tabbycat/static/vue/',
// Need to set baseUrl for hot module reloading (proxies to the local server)
// But want to disable this when building for production
publicPath: process.env.NODE_ENV === 'production' ?
'/static/vue/'
: 'http://localhost:8888',
// Don't add a hash to the filename
filenameHashing: false,
// We use <templates> in components; so need to include the compile
runtimeCompiler: true,
// Must output chunks to the same directory so async loading works
configureWebpack: {
output: {
chunkFilename: '[name].js'
}
},
lintOnSave: process.env.NODE_ENV !== 'production', // Lint if not in production
// Don't split out vendors file
chainWebpack: config => {
config.optimization.splitChunks(false)
},
devServer: {
port: 8888,
headers: {
'Access-Control-Allow-Origin': '*' // Allow hot module reload
}
},
pages: {
app: {
entry: 'tabbycat/templates/js-bundles/main.js'
}
},
pluginOptions: {
webpackBundleAnalyzer: {
analyzerMode: 'disabled', // Disabled for speed
defaultSizes: 'gzip', // Show the filesizes as if gzipped
openAnalyzer: false // Enable to view a heatmap of dependency sizes
}
}
}