-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
26 lines (25 loc) · 906 Bytes
/
webpack.config.js
File metadata and controls
26 lines (25 loc) · 906 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
"use strict";
const path = require("path");
const loaders = require("./webpack.loader");
const ReactRefreshPlugin = require("@pmmmwh/react-refresh-webpack-plugin");
const config = {
target: "web",
mode: "development",
devtool: "eval-cheap-module-source-map",
entry: {
index: "./src/index.tsx",
}, // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/
output: {
// the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
path: path.resolve(__dirname, "dist"),
filename: "index.js",
// libraryTarget: 'commonjs2',
},
resolve: {
// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
extensions: [".ts", ".js", ".jsx", ".tsx"],
},
...loaders,
plugins: [new ReactRefreshPlugin()],
};
module.exports = config;