forked from simplygoodwork/craft-donkeytail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
53 lines (51 loc) · 1.3 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
43
44
45
46
47
48
49
50
51
52
53
const path = require('path')
const WriteFilePlugin = require('write-file-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
let config = {
https: false,
host: 'localhost',
port: 8080,
watchDir: 'src/templates/_components/fields/',
}
module.exports = {
pages: {
app: {
entry: 'src/assetbundles/donkeytail/src/main.js',
},
},
runtimeCompiler: true,
outputDir: 'src/assetbundles/donkeytail/dist',
filenameHashing: false,
css: {
sourceMap: true,
},
devServer: {
host: config.host,
port: config.port,
headers: { 'Access-Control-Allow-Origin': '*' },
https: config.https,
clientLogLevel: 'info',
disableHostCheck: true,
contentBase: path.join(__dirname, config.watchDir),
watchContentBase: true,
},
productionSourceMap: false, // breaks build
transpileDependencies: [],
configureWebpack: {
plugins: [
new WriteFilePlugin({
test: /^((?!(hot-update\.js)).)*$/,
}),
new MiniCssExtractPlugin({
// filename: 'css/[name].[contenthash].css',
filename: 'css/[name].css',
}),
],
},
// Disable building a useless index.html file
chainWebpack: config => {
config.plugins.delete('html')
config.plugins.delete('preload')
config.plugins.delete('prefetch')
},
}