|
3 | 3 | const path = require("path"); |
4 | 4 |
|
5 | 5 | module.exports = { |
6 | | - mode: "development", |
7 | | - devtool: "source-map", |
8 | | - entry: path.join(__dirname, "src", "index.js"), |
9 | | - output: { |
10 | | - path: path.join(__dirname, "build"), |
11 | | - filename: "bundle.js", |
12 | | - }, |
13 | | - devServer: { |
14 | | - static: path.join(__dirname, "public"), |
15 | | - port: 3000, |
16 | | - }, |
17 | | - module: { |
18 | | - rules: [ |
19 | | - { |
20 | | - test: /\.js$/, |
21 | | - exclude: /(node_modules|bower_components)/, |
22 | | - use: { |
23 | | - loader: require.resolve(".."), // you would put oxc-loader |
24 | | - options: { |
25 | | - sourcemap: true, |
26 | | - jsx: { |
27 | | - runtime: "classic", |
28 | | - pragma: "React.createElement", |
29 | | - pragmaFrag: "React.Fragment", |
30 | | - throwIfNamespace: true, |
31 | | - development: false, |
32 | | - }, |
33 | | - }, |
34 | | - }, |
| 6 | + mode: "development", |
| 7 | + devtool: "source-map", |
| 8 | + entry: path.join(__dirname, "src", "index.js"), |
| 9 | + output: { |
| 10 | + path: path.join(__dirname, "build"), |
| 11 | + filename: "bundle.js", |
| 12 | + }, |
| 13 | + devServer: { |
| 14 | + static: path.join(__dirname, "public"), |
| 15 | + port: 3000, |
| 16 | + }, |
| 17 | + module: { |
| 18 | + rules: [ |
| 19 | + { |
| 20 | + test: /\.js$/, |
| 21 | + exclude: /(node_modules|bower_components)/, |
| 22 | + use: { |
| 23 | + loader: require.resolve(".."), // you would put oxc-loader |
| 24 | + options: { |
| 25 | + sourcemap: true, |
| 26 | + jsx: { |
| 27 | + runtime: "classic", |
| 28 | + pragma: "React.createElement", |
| 29 | + pragmaFrag: "React.Fragment", |
| 30 | + throwIfNamespace: true, |
| 31 | + development: false, |
35 | 32 | }, |
36 | | - ], |
37 | | - }, |
| 33 | + }, |
| 34 | + }, |
| 35 | + }, |
| 36 | + ], |
| 37 | + }, |
38 | 38 | }; |
0 commit comments