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

Update to Webpack 5 #197

Merged
merged 21 commits into from
Dec 8, 2020

Conversation

KallynGowdy
Copy link
Member

When merged, this PR will update Webpack to version 5.

Notes

  • offline-plugin does not support Webpack 5 so it has been replaced with workbox-webpack-plugin.
  • Chrome has a bug that causes it to be unable to load large web workers when URL.revokeObjectURL() is called immediately after creating the worker. (See worker-loader#292) To fix this a fork of worker-loader was made which runs URL.revokeObjectURL() 1 second after the worker was created.
  • Lots of loaders and plugins were updated.

- offline-plugin doesn't support Webpack 5 so we have to switch to workbox-webpack-plugin.
- webpack-merge removed support for merge.smart so we had to update usage.
- webpack has caching built in now so hard-source-webpack-plugin is no longer needed.
- webpack removed automatic polyfills for Node APIs so we have to install the "buffer" package manually.
- css-loader had the minimize option removed.
- copy-plugin had some options change.
- webpack removed the ability to specify complex loader strings in the webpack config so the imports/exports for tweetnacl had to be reworked.
- webpack no longer needs HashedModuleIdsPlugin.
- worker-loader started exporting the result as a default import instead of a bare commonjs import
- vue-style-loader is not compatible with css-loader 5.x
- Also vue-style-loader is really only used for Server Side Rendering support (which we don't use)
- Will have changes to fix the Chrome loading issue. (webpack-contrib/worker-loader#292)
- It is only going to be used internally so there is no reason to publish it
@KallynGowdy KallynGowdy merged commit d3813e3 into casual-simulation:develop Dec 8, 2020
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.

1 participant