-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.development.js
48 lines (39 loc) · 1.12 KB
/
webpack.development.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
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require("path");
const fs = require("fs");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
// eslint-disable-next-line @typescript-eslint/no-explicit-any
module.exports = (env) => {
const devConfig = {
mode: env.mode,
devtool: "inline-source-map",
devServer: {
open: true,
},
module: {
rules: [
// {
// enforce: "pre",
// test: /\.(js|jsx|ts|tsx)$/,
// exclude: /node_modules/,
// loader: "eslint-loader",
// },
{
test: /\.tsx?$/,
loader: "ts-loader",
exclude: /node_modules/,
},
],
},
output: {
path: path.resolve(__dirname, "dist"),
filename: "[name].js",
},
plugins: [
new MiniCssExtractPlugin({
filename: "[name].css",
}),
],
};
return devConfig;
};