Skip to content

Commit

Permalink
Merge pull request #1242 from cxcorp/smaller-bundle
Browse files Browse the repository at this point in the history
Make JS bundle 25% smaller
  • Loading branch information
Veikkosuhonen authored Mar 20, 2024
2 parents d89f626 + 5c040f5 commit 21431ea
Show file tree
Hide file tree
Showing 40 changed files with 137 additions and 1,303 deletions.
13 changes: 0 additions & 13 deletions config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,7 @@
const webpack = require('webpack')

module.exports = function override(config) {
const fallback = config.resolve.fallback || {}
Object.assign(fallback, {
path: require.resolve('path-browserify'),
fs: require.resolve('browserify-fs'),
os: require.resolve('os-browserify/browser'),
stream: require.resolve('stream-browserify'),
util: require.resolve('util/'),
})
config.resolve.fallback = fallback
config.plugins = (config.plugins || []).concat([
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
}),
new webpack.DefinePlugin({
CONFIG: (() => {
const config = require('config')
Expand Down
Loading

0 comments on commit 21431ea

Please sign in to comment.