-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathwebpack.config.js
43 lines (42 loc) · 1.19 KB
/
webpack.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
const CopyWebpackPlugin = require("copy-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const path = require("path");
module.exports = {
entry: {
main: "./src/main-app/index.tsx",
},
devtool: "source-map",
mode: "development",
module: {
rules: [
{
test: /\.tsx?$/,
exclude: /node_modules/,
use: "ts-loader",
},
],
},
output: {
path: path.resolve(__dirname, "dist"),
filename: "[name].js",
},
resolve: {
extensions: [".tsx", ".ts", ".js", ".json"],
},
plugins: [
new CleanWebpackPlugin(),
new CopyWebpackPlugin({
patterns: [
{ context: "node_modules/slick-carousel/slick", from: "{slick,slick-theme}.css" },
{ context: "node_modules/slick-carousel/slick", from: "fonts/slick.*" },
{ context: "node_modules/nouislider/distribute", from: "nouislider.min.css" },
{ context: "public", from: "**/*" },
],
}),
],
experiments: {
// this option is deprecated in favor of 'asyncWebAssembly', but unfortunately
// 'asyncWebAssembly' doesn't work because of https://github.com/rustwasm/wasm-bindgen/issues/2343
syncWebAssembly: true,
},
};