-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
fix: ignore webpack warnings by source-map-loader #11752
base: main
Are you sure you want to change the base?
Conversation
Some third party packages may ship miss-configured sourcemaps, that interrupts the build See: facebook#11278 (comment)
Not sure if everything should be ignored or only warnings regarding node modules? |
source-maps-loader is used 99.9% of cases for node_modules only |
You could use the suggested example of ignoreWarnings: [/Failed to parse source map/] from the source map loader docs https://github.com/webpack-contrib/source-map-loader#ignoring-warnings |
This will not give us the desired feature of focusing on |
@Bnaya I've tried rerunning the tests, but seem to be an issue either with caching or lock file - When doing |
I've ran npm install (With npm 8.3) and committed the updated lock file. |
CI passes |
I don't know how relevant this is, but I had ejected after upgrading to CRA 5, and I wanted to implement this So the fix for me was to change the relevant line to: warning.module?.resource.includes('node_modules') && (Note the optional chaining) I don't know under what circumstances |
I will add a null check there, even tho by webpack code/types module shouldn't be undefined. Regarding using optional chaining, eslint won't let me use it in the project, so i will go with old-style check |
I was able to replicate the issue. What I did was introduce an ESLint error into one of my TSX files by simply adding: const unusedVar = 1; and never actually using
As stated in my original comment, I have ejected CRA with very minimal config changes, so I don't know how relevant my error is for non-ejected CRA. |
@Bnaya , to be on-par with CRA4 when it comes to webpack dev server logging, could you consider adding
to webpack.config.json? This will get rid of all the assets bundling verbosity introduced in CRA5, while keeping warnings and errors displayed. |
I think It's out of the scope of this PR |
Just a fly on the wall here, and following this topic as were affected by this as well. |
Is anyone currently working on resolving the conflicts for this PR? I think there are many of us waiting for this fix :) |
Waiting for this too. Any updates? |
Another case where dependencies produce warnings. my project depends on
|
any update on this PR? Can someone solve the conflicts and merge it? |
😭😭😭😭 |
Any update on this please? |
Any update pls. |
NOTE: set .env GENERATE_SOURCEMAP=false as a temporary solution to avoid 'Failed to parse source map...' warnings until fix is released: facebook/create-react-app#11752
Some third party packages may ship miss-configured sourcemaps, that interrupts the build
See: #11278 (comment)
To trigger the error, simply install "[email protected]"
add
import {} from "stylis-plugin-rtl"
somewhere in the codebefore:
After: