forked from cosmos/cosmjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.web.config.js
44 lines (42 loc) · 1.01 KB
/
webpack.web.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
44
/* eslint-disable @typescript-eslint/naming-convention */
const glob = require("glob");
const path = require("path");
const webpack = require("webpack");
const target = "web";
const distdir = path.join(__dirname, "dist", "web");
module.exports = [
{
// bundle used for Karma tests
target: target,
entry: glob.sync("./build/**/*.spec.js"),
output: {
path: distdir,
filename: "tests.js",
},
plugins: [
new webpack.EnvironmentPlugin({
SIMAPP44_ENABLED: "",
SLOW_SIMAPP44_ENABLED: "",
SIMAPP46_ENABLED: "",
SLOW_SIMAPP46_ENABLED: "",
SIMAPP47_ENABLED: "",
SLOW_SIMAPP47_ENABLED: "",
SIMAPP50_ENABLED: "",
SLOW_SIMAPP50_ENABLED: "",
}),
new webpack.ProvidePlugin({
Buffer: ["buffer", "Buffer"],
}),
],
resolve: {
fallback: {
buffer: false,
crypto: false,
events: false,
path: false,
stream: false,
string_decoder: false,
},
},
},
];