forked from adamlaska/coinbase-wallet-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
59 lines (57 loc) · 1.22 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const path = require("path");
const webpack = require("webpack");
const { env } = process;
const tsConfigPath = (exports.tsConfigPath = path.join(
__dirname,
"tsconfig.json"
));
module.exports = {
target: "web",
entry: [
"core-js/stable",
"regenerator-runtime/runtime",
"whatwg-fetch",
"./src/index.ts"
],
// devtool: 'inline-source-map',
mode: "production",
module: {
rules: [
{
test: /\.tsx?$/,
use: {
loader: "ts-loader",
options: {
configFile: tsConfigPath
}
},
exclude: /node_modules/
}
]
},
resolve: {
fallback: {
fs: false,
stream: require.resolve("stream-browserify")
},
extensions: [".ts", ".tsx", ".js"],
plugins: [],
symlinks: false
},
output: {
filename: "CoinbaseWalletSDK.js",
path: path.resolve(__dirname, "build")
},
performance: {
hints: false
},
plugins: [
new webpack.DefinePlugin({
"process.env": {
NODE_ENV: JSON.stringify(env.NODE_ENV) || JSON.stringify("production"),
LINK_API_URL: JSON.stringify(env.LINK_API_URL),
SDK_VERSION: JSON.stringify(require("./package.json").version)
}
})
]
};