-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
36 lines (35 loc) · 939 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
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var TerserPlugin = require('terser-webpack-plugin');
module.exports = {
watch: true ,
entry: { index: './src/map.js' } ,
output: {
path: path.resolve(__dirname, 'dist'),
filename: './build/[name].js'
} ,
devServer: {
contentBase: './dist/',
compress: true,
port: 3000
} ,
module: {
rules: [
{
test: /\.(s*)css$/ ,
use: ExtractTextPlugin.extract({
fallback:'style-loader',
use:['css-loader','sass-loader'],
})
}
]
} ,
plugins: [
new ExtractTextPlugin({ filename: '/css/appbundle.css' }) ,
] ,
optimization: {
minimize: true,
minimizer: [new TerserPlugin()],
},
};
// "webpack -d --watch"