forked from JYC-99/react-mxgraph
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.dev.js
More file actions
52 lines (50 loc) · 1.17 KB
/
webpack.config.dev.js
File metadata and controls
52 lines (50 loc) · 1.17 KB
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
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const commonConfig = require('./webpack.config.common');
module.exports = merge(
commonConfig,
{
mode: 'development',
entry: [
'./demo/index.tsx' // the entry point of our app
],
devtool: 'cheap-module-eval-source-map',
module: {
rules: [
{
test: /\.(j|t)sx$/,
include: /node_modules/,
use: ['react-hot-loader/webpack'],
},
{
test: /\.js$/,
use: ["source-map-loader"],
enforce: "pre"
},
{
test: /\.scss$/,
use: [
"style-loader",
"css-loader",
"sass-loader"
]
},
],
},
plugins: [
new webpack.NamedModulesPlugin(), // prints more readable module names in the browser console on HMR updates
new HtmlWebpackPlugin({
template: 'demo/index.html'
})
],
devServer: {
open: true,
overlay: {
warnings: true,
errors: true,
},
},
}
);