-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathwebpack.common.js
More file actions
30 lines (28 loc) · 813 Bytes
/
Copy pathwebpack.common.js
File metadata and controls
30 lines (28 loc) · 813 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 path = require("path");
const OUTDIR = path.join(__dirname, "/dist");
module.exports = {
mode: "none",
entry: [path.join(__dirname, "/src/index.ts")],
output: {
path: OUTDIR,
publicPath: "/",
libraryTarget: "umd",
umdNamedDefine: true,
// it seems as though outputting `umd` should not dump `window`,
// but it does... which breaks node.js projects. Explicitly
// set the global object here.
globalObject: "typeof self !== 'undefined' ? self : this",
},
module: {
rules: [
{
test: /\.tsx?$/,
use: "awesome-typescript-loader",
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [".tsx", ".ts", ".js"],
},
};