Can I use webpack 5 with the XDN?
We plan to update the @xdn/core
to use webpack 5 when bundling your XDN router in the next few days. We already have a PR for that under review. We have not tested the withXDN
and withServiceWorker
plugins from @xdn/next
with webpack 5 yet, so those may have issues that need to be resolved. We are committed to doing so. More on that in the next few days…
After a some investigation I’ve found that the XDN is compatible with webpack 5, but some deprecation warnings are shown:
node:75752) [DEP_WEBPACK_SINGLE_ENTRY_PLUGIN] DeprecationWarning: SingleEntryPlugin was renamed to EntryPlugin
info - Creating an optimized production build...
(node:75760) [DEP_WEBPACK_SINGLE_ENTRY_PLUGIN] DeprecationWarning: SingleEntryPlugin was renamed to EntryPlugin
> Creating service worker...
(node:75760) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated.
BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.
Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.
Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (127kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
(node:75760) [DEP_WEBPACK_CHUNK_HAS_ENTRY_MODULE] DeprecationWarning: Chunk.hasEntryModule: Use new ChunkGraph API
The DEP_WEBPACK_SINGLE_ENTRY_PLUGIN seems to be coming from Next.js itself, while the DEP_WEBPACK_COMPILATION_ASSETS warning comes from the withXDN()
plugin from @xdn/next
.
We will fix this warning soon, but it appears that everything still works as expected.