Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(web-console): upgrade webpack, enable HMR #205

Merged
merged 9 commits into from
Oct 10, 2023

Conversation

argshook
Copy link
Contributor

PR Description:

Update webpack and webpack-dev-server, remove externalized babel configs, refactor dev/prod split in webpack config, add babel config, remove slow clean-webpack-plugin, ignore .yarn files, split bundle output into main and vendor chunks, enable hot reload, use cheaper devtool, do not resolve symlinks, use explicit styled icons packages to avoid bundle size explosion, tidier code with no notable changes, mark react-components as side effects free to enable webpack tree-shaking, and build react-components with esNext modules for tree shaking and hot reload.

Commit log:

  • update webpack and webpack-dev-server
  • remove externalized babel configs
    will move them to webpack config next to babel-loader
  • update webpack config
    • refactor dev/prod split
    • add babel config
    • remove clean-webpack-plugin for now, seems to be slow
    • ignore .yarn files where possible
    • split bundle output into 2 chunks: main and vendor
    • enable hot reload
    • use cheaper devtool
    • do not resolve symlinks (we use yarn PnP which doesn't do linking)
  • use explicit styled icons packages
    • avoid "catch all" package as it can explode the bundle in size (and compile time)
  • tidier code, no notable changes
  • mark react-components as side effects free
    this enables webpack to tree-shake the library
  • build react-components with esNext modules
    this enables tree shaking and hot reload

will move them to webpack config next to babel-loader
* refactor dev/prod split
* add babel config
* remove `clean-webpack-plugin` for now, seems to be slow
* ignore `.yarn` files where possible
* split bundle output into 2 chunks: main and vendor
* enable hot reload
* use cheaper devtool
* do not resolve symlinks (we use yarn PnP which doesn't do linking)
* avoid "catch all" package as it can explode the bundle in size (and compile time)
this enables webpack to tree-shake the library
this enables tree shaking and hot reload
@argshook argshook self-assigned this Oct 10, 2023
@argshook argshook changed the title Update webpack config, remove babel configs, use explicit styled icons, mark react-components as side effects free, build with esNext modules chore(web-console): upgrade webpack, enable HMR Oct 10, 2023
insmac
insmac previously approved these changes Oct 10, 2023
* shorter hashes
* hashes on all bundles
* guarantess killing browser cache when we release versions
@insmac insmac merged commit de732da into main Oct 10, 2023
1 check passed
@insmac insmac deleted the fix-module-resolution-and-add-hot-reload branch October 10, 2023 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants