reduce browser bundle size
reduces browser bundle size by ~612k or ~92%.
This commit is contained in:
@@ -18,10 +18,9 @@ function generateConfig(name) {
|
||||
resolve: {
|
||||
// Add '.ts' and '.tsx' as resolvable extensions.
|
||||
extensions: [".webpack.js", ".web.js", ".ts", ".tsx", ".js"],
|
||||
fallback: {
|
||||
"crypto": require.resolve("crypto-browserify"),
|
||||
"buffer": require.resolve("buffer/"),
|
||||
"stream": require.resolve("stream-browserify")
|
||||
alias: {
|
||||
[path.resolve(__dirname, "../lib/util/node-support.js")]:
|
||||
path.resolve(__dirname, "../lib/util/browser-support.js"),
|
||||
}
|
||||
},
|
||||
|
||||
@@ -66,4 +65,4 @@ function generateConfig(name) {
|
||||
return config;
|
||||
}
|
||||
|
||||
module.exports = generateConfig('bybitapi');
|
||||
module.exports = generateConfig('bybitapi');
|
||||
|
||||
Reference in New Issue
Block a user