Closed
Description
🎉 Thanks for being brave and donating your valuable time to testing unfinished beta software 🎉
webpack 5 is in beta phase now. This means major changes and features are done. Major breaking changes have been added. Basic backward-compatibility has been added.
We want to use the beta phase to do the following:
- Let a boarder range of users test the beta version.
- Find bugs in new features.
- Find regressions in old features.
- Find places where a compat-layer can be added to avoid breaking changes.
- Improve the migration guide and changelog.
We want to reach these goals after the beta phase:
- Old features are very stable
- New features are a bit stable
- Backward-compatibility layer allows most existing plugins/loader to work unmodified (potentially with deprecation warnings)
- There clear way how to migrate from webpack 4 to 5
- There are experimental webpack 5 branches for higher-level tools (like angular-cli, vue-cli, create-react-app, ...) (at least 2)
To help with testing you can do the following:
- Always test with the latest webpack beta version, as problems might already be fixed there
- When using webpack directly:
- Follow the migration guide
- Report or add missing steps in the migration guide
- Report problems during the migration
- Report problems with the build after the migration
- When using a higher-level tool:
- Check if there is a branch/Pull Request for webpack 5
- Follow guide there
- Report problems in the Pull Request
- Make sure to also report (positive) experience
- Performance comparison
- Size comparison
- DX comparison
- Try new features
- Enable persistent caching -> guide
- Enable Top Level Await
- Enable the new
asset
module type - Enable Long Term Caching
- Try to break filesystem watching
- Trace back deprecation warnings with
node --trace-deprecation
- Help upgrading plugins/loaders
- Make sure to follow beta releases
- Retest newer version to avoid regressions in beta versions
- Consider sponsoring webpack when this version
- increases your productivity with better build performance
- increases your productivity with better developer experience
- increases your consumer happiness with better application performance
- make you happy in some other way...
Known problems:
eval()
causes problems with theoptimization.innerGraph
(production).libraryTarget: "module"
is not implemented yetdevtool
s don't support persistent caching yet- Persistent Cache file include absolute paths are are not portable yet
import.meta
is still missing- prefetching doesn't work for WASM yet
- CLI arguments doesn't contribute to cache version
stack trace is incorrectly displayed in stats- Build Time is a bit higher for non-cached builds. Possible reasons:
- tracking extra information in the resolver for safe caching
- mini-css-extract-plugin is not able to persistent cache yet
- Crashes when using
lintDirtyModulesOnly
and webpack 5.beta0 webpack-contrib/stylelint-webpack-plugin#187 - svg-sprite-loader doesn't work
- There is no warning for Buffer or process yet.
Planned breaking changes:
devtool options will be more restrictive- Internal HMR API for plugins will probably change
Disable some webpack-only syntax by default:require.ensure
,require.include
- terser-webpack-plugin will be upgraded
cache.store != "pack" will be removed