forked from mishushakov/dialogflow-web-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
executable file
·42 lines (39 loc) · 987 Bytes
/
webpack.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 { VueLoaderPlugin } = require('vue-loader')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const path = require('path')
const env = process.env.NODE_ENV
module.exports = {
entry: path.join(__dirname, 'src', 'main.js'),
mode: env,
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/dist/',
filename: 'build.js'
},
optimization: {
minimizer: [new UglifyJsPlugin()],
},
module: {
rules: [{
test: /\.vue$/,
loader: 'vue-loader'
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.(css|sass|)$/i,
loader: 'vue-style-loader!css-loader!sass-loader?indentedSyntax',
}]
},
devServer: {
historyApiFallback: true,
disableHostCheck: true,
noInfo: true
},
plugins: [
new VueLoaderPlugin()
]
}