-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
30 lines (29 loc) · 868 Bytes
/
webpack.config.js
File metadata and controls
30 lines (29 loc) · 868 Bytes
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
const webpack = require("webpack");
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
module.exports = {
entry: "./src/client/index.tsx",
module: {
rules: [
{
test: /\.(ts|tsx)$/,
exclude: /node_modules/,
use: ["babel-loader"],
},
{
test: /\.js$/,
use: ["source-map-loader"],
enforce: "pre",
},
],
},
resolve: {
extensions: ["*", ".ts", ".tsx", ".js", ".jsx"],
plugins: [new TsconfigPathsPlugin({ configFile: "./tsconfig.client.json" })],
},
output: {
path: __dirname + "/static/build",
publicPath: "/",
filename: "index.js",
},
plugins: [new webpack.HotModuleReplacementPlugin()],
};