-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.dev.js
39 lines (38 loc) · 1.01 KB
/
webpack.config.dev.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
const path = require('path');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const webpack = require('webpack');
/**
* This contains just the specific config for development mode.
*
* This is not called directly. but using the command:
* 'webpack --mode development'
* This ensures that the common config is also included.
**/
module.exports = {
name: 'developmentConfig',
mode: 'development',
dependencies: ['common-config'],
optimization: {
minimize: false,
},
devtool: 'inline-source-map',
devServer: {
headers: {"Access-Control-Allow-Origin": "*"},
static: {
directory: path.join(__dirname, 'built'),
},
compress: false,
port: 8080,
hot: true,
},
output: {
filename: "./js/[name].js",
},
plugins: [
new MiniCssExtractPlugin({
filename: 'css/[name].css',
chunkFilename: 'css/[name].css'
}),
new webpack.EnvironmentPlugin({"GA4": "G-2XDQTMVL9Y"})
]
};