You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like PR 16477 introduced a regression for us while running in watch mode for recompilations. Specifically the addition of the if stmt in NormalModuleFactory.js.
What is the current behavior?
The initial build reports no errors but anytime it re-compiles due to a file change, the errors show up. They're all asset related errors and it doesn't seem break the build as far as I can tell. The assets in question are mostly css images but it's also occurring for a json file we're importing in our js code. That initially made me thing it was css-loader related but the json file error throws a wrench in that theory.
The one common feature is that both sets of assets are requested with alias paths but the error messages report the absolute path.
ERROR in ./docs/assets/definitions/default.json 2:11
Module parse failed: Unexpected token (2:11)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| {
> "default": {
| "desktop": [
| {
It's an unexpected error considering importing json files in JS should just work, and does on the initial compilation.
If the current behavior is a bug, please provide the steps to reproduce.
I haven't had time to create a simplified reproduction since our setup is pretty complex but I figured I'd at least report something in case someone else has encountered this before or it sparks an ah-ha moment. If that's ultimately what's needed me or my colleague will try to get something together.
What is the expected behavior?
If the loader for the resources were truly missing, then I'd expect to to affect all assets and it's only affecting some of them.
Bug report
Looks like PR 16477 introduced a regression for us while running in watch mode for recompilations. Specifically the addition of the if stmt in NormalModuleFactory.js.
What is the current behavior?
The initial build reports no errors but anytime it re-compiles due to a file change, the errors show up. They're all asset related errors and it doesn't seem break the build as far as I can tell. The assets in question are mostly css images but it's also occurring for a json file we're importing in our js code. That initially made me thing it was css-loader related but the json file error throws a wrench in that theory.
The one common feature is that both sets of assets are requested with alias paths but the error messages report the absolute path.
It's an unexpected error considering importing json files in JS should just work, and does on the initial compilation.
If the current behavior is a bug, please provide the steps to reproduce.
I haven't had time to create a simplified reproduction since our setup is pretty complex but I figured I'd at least report something in case someone else has encountered this before or it sparks an ah-ha moment. If that's ultimately what's needed me or my colleague will try to get something together.
What is the expected behavior?
If the loader for the resources were truly missing, then I'd expect to to affect all assets and it's only affecting some of them.
Other relevant information:
webpack version: 5.78.0
Node.js version: v20.3.0
Operating System: OSX 13.3.1
Additional tools:
The text was updated successfully, but these errors were encountered: