-
Notifications
You must be signed in to change notification settings - Fork 10
/
webpack.base.config.js
38 lines (36 loc) · 1.04 KB
/
webpack.base.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
"use strict";
const path = require("path");
const Dotenv = require("dotenv-webpack");
const webpack = require("webpack");
module.exports = {
mode: "development",
output: {
path: path.resolve(__dirname, "dist"),
filename: "[name].js",
},
externals: {
"level": "require('level')",
"bcrypto": "require('bcrypto')",
"leveldown": "require('leveldown')",
"bufferutil": "require('bufferutil')",
"utf-8-validate": "require('utf-8-validate')",
},
devtool: "cheap-source-map",
node: {
__dirname: false,
__filename: false
},
resolve: {
mainFields: ["main", "module"],
extensions: [".tsx", ".ts", ".js", ".json"],
},
plugins: [
new Dotenv(),
new webpack.IgnorePlugin({
resourceRegExp: /\@chainsafe\/blst/,
}),
new webpack.DefinePlugin({
"process.env.DOCKER_LIGHTHOUSE_IMAGE": JSON.stringify(process.env.DOCKER_LIGHTHOUSE_IMAGE || "sigp/lighthouse:v1.1.1"),
}),
]
};