question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple warnings when upgrading webpack to v5

See original GitHub issue

I am trying to upgrade webpack to v5 and I get multiple warnings coming for the extract-css-chunks-webpack-plugin plugin:

[DEP_WEBPACK_MAIN_TEMPLATE_RENDER_MANIFEST] DeprecationWarning: MainTemplate.hooks.renderManifest is deprecated (use Compilation.hooks.renderManifest instead)

[DEP_WEBPACK_MAIN_TEMPLATE_HASH_FOR_CHUNK] DeprecationWarning: MainTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead)

[DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader

[DEP_WEBPACK_MODULE_ID] DeprecationWarning: Module.id: Use new ChunkGraph API

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:9
  • Comments:6

github_iconTop GitHub Comments

1reaction
stylemistakecommented, Oct 28, 2021

Yep, we have migrated to mini-css-extract-plugin. This particular plugin is still superior in minor regards, but I’d rather use Webpack 5 at this point.

0reactions
stylemistakecommented, Apr 20, 2022

@jakedowns Yes, we use mini-css-extract-plugin in tgstation (tgui) to produce static CSS files for each entry point. Perhaps you’ll find this config useful.

We’re not using chunking here though, so can’t comment on that.

https://github.com/tgstation/tgstation/blob/1dc83191daf55d54f5e1285c2f8b1af8c2c99b75/tgui/webpack.config.js#L34-L43

Read more comments on GitHub >

github_iconTop Results From Across the Web

To v5 from v4 - webpack
Upgrade webpack 4 and its plugins/loaders · Make sure your build has no errors or warnings · Make sure to use mode ·...
Read more >
Upgrading Webpack 4 → 5 | Square Corner Blog
It supports multiple locales by default, is typed, and has a few niceties such as warning on unused strings and the ability to...
Read more >
Top 5 Changes in webpack v5 - Ryan H. Lewis
That means two years of Webpack adding new features, making changes, and putting warnings behind soon-to-be deprecated parts of Webpack.
Read more >
Upgrade to Webpack 5 failing - node.js - Stack Overflow
0.0 no longer allows custom properties in configuration. Loaders should be updated to allow passing options via loader options in module.rules.
Read more >
Migrating to webpack 5 to improve build time and reduce ...
Webpack migration from v4 to v5 is not just upgrading the webpack version, it's about migrating all the plugins and loaders to their...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found