forked from helxplatform/helx-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.config.js
49 lines (48 loc) · 1.38 KB
/
webpack.dev.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
const express = require('express')
const path = require('path')
const webpack = require('webpack')
const ReactRefreshPlugin = require('@pmmmwh/react-refresh-webpack-plugin')
const ForkTsCheckerPlugin = require('fork-ts-checker-webpack-plugin')
const ESLintPlugin = require('eslint-webpack-plugin')
const { merge } = require('webpack-merge')
const { baseConfig, paths, createBabelLoader, createCopyPlugin } = require('./webpack.base.config.js')
module.exports = merge(baseConfig, {
mode: 'development',
devtool: 'eval-source-map',
devServer: {
historyApiFallback: true,
static: {
directory: paths.build,
watch: {
ignored: /node_modules/
},
},
port: 3000,
hot: true,
open: true,
compress: true,
client: {
logging: 'info',
overlay: {
warnings: false,
errors: true
}
}
},
module: {
rules: [ createBabelLoader({ isDevelopment: true }) ]
},
plugins: [
new ReactRefreshPlugin(),
new ForkTsCheckerPlugin({
async: false
}),
new ESLintPlugin({
extensions: ['js', 'jsx', 'ts', 'tsx']
}),
new webpack.EnvironmentPlugin({
'NODE_ENV': 'development'
}),
createCopyPlugin({ isDevelopment: true })
]
})