-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.debug.config.js
More file actions
39 lines (38 loc) · 888 Bytes
/
webpack.debug.config.js
File metadata and controls
39 lines (38 loc) · 888 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
31
32
33
34
35
36
37
38
39
(function () {
const path = require("path");
const glob = require("glob");
module.exports = {
entry: glob.sync("./src/**/*.{ts,tsx}").reduce((acc, file) => {
acc[file.replace(/^\.\/src\//, "").replace(/\.ts/, "")] = file;
return acc;
}, {}),
devtool: "source-map",
mode: "development",
target: "node",
plugins: [],
module: {
rules: [
{
test: /\.tsx?$/,
use: "ts-loader",
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [".tsx", ".ts", ".js", "jsx"],
},
node: {
__dirname: false,
__filename: false,
},
output: {
library: "myLib",
libraryTarget: "commonjs2",
globalObject: "this",
filename: "[name].js",
sourceMapFilename: "[name].js.map",
path: path.resolve(__dirname, "build"),
},
};
})();