forked from torusresearch/torus-embed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
36 lines (31 loc) · 985 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
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require("path");
const { EnvironmentPlugin } = require("webpack");
const pkg = require("./package.json");
exports.baseConfig = {
output: {
libraryExport: "default",
},
resolve: {
alias: {
"bn.js": path.resolve(__dirname, "node_modules/bn.js"),
lodash: path.resolve(__dirname, "node_modules/lodash"),
"js-sha3": path.resolve(__dirname, "node_modules/js-sha3"),
"web3-providers-ipc": path.resolve(__dirname, "node_modules/empty-module"),
"web3-providers-ws": path.resolve(__dirname, "node_modules/empty-module"),
},
},
plugins: [new EnvironmentPlugin({ TORUS_EMBED_VERSION: pkg.version })],
};
// module.exports = [cjsConfig]
// V5
// experiments: {
// outputModule: true
// }
// node: {
// global: true,
// },
// resolve: {
// alias: { crypto: 'crypto-browserify', stream: 'stream-browserify', vm: 'vm-browserify' },
// aliasFields: ['browser'],
// },