forked from vircadia/vircadia-web-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
43 lines (33 loc) · 1020 Bytes
/
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 path = require("path"); // eslint-disable-line
const WorkerUrlPlugin = require("worker-url/plugin"); // eslint-disable-line
module.exports = {
entry: {
Vircadia: "./src/Vircadia.ts"
},
resolve: {
extensions: [".webpack.js", ".web.js", ".ts", ".tsx", ".js"]
},
experiments: {
outputModule: true
},
output: {
filename: "[name].js",
path: path.resolve(__dirname, "dist"),
library: {
type: "module"
},
module: true,
clean: true
},
// Enable sourcemaps for debugging webpack's output.
devtool: "source-map",
plugins: [ new WorkerUrlPlugin() ], // eslint-disable-line
module: {
rules: [
// '.ts' and '.tsx' files are handled by 'ts-loader'.
{ test: /\.tsx?$/u, loader: "ts-loader" },
// '.js' files have sourcemaps re-processed by 'source-map-loader'.
{ test: /\.js$/u, loader: "source-map-loader" }
]
}
};