forked from konflux-ci/konflux-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.dev.config.js
40 lines (39 loc) · 1005 Bytes
/
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
import { merge } from 'webpack-merge';
import commonConfig from './webpack.config.js';
import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
export default merge(commonConfig, {
mode: 'development',
devtool: 'inline-source-map',
devServer: {
hot: true,
},
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: ['style-loader', 'css-loader', 'sass-loader'],
},
{
test: /\.[jt]sx?$/i,
exclude: /(node_modules)/,
use: [
{
loader: 'swc-loader',
options: {
jsc: {
transform: {
react: {
development: true,
refresh: true,
},
},
},
},
},
],
},
],
},
plugins: [new ReactRefreshWebpackPlugin(), new ForkTsCheckerWebpackPlugin()],
});