Webpack Loader set from Webpack Plugin with Next Compiler can't accept value contains `!(exclamation mark)`
Link to the code that reproduces this issue
https://github.com/tkow/repro-nextjs-compiler-opt-bug
To Reproduce
- npm i in the repo
- npm run dev and check compile error
- change noop-plugins.js that remove
!from testOptions string. - restart
npm run devand compile success
Current vs. Expected behavior
Webpack plugin option can accept ! exclamaton mark as string
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.5.0: Wed May 1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020
Available memory (MB): 32768
Available CPU cores: 12
Binaries:
Node: 18.20.2
npm: 10.5.0
Yarn: 3.6.3
pnpm: 8.7.6
Relevant Packages:
next: 14.2.3 // Latest available version is detected (14.2.3).
eslint-config-next: 14.2.3
react: 18.3.1
react-dom: 18.3.1
typescript: 5.4.5
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
SWC
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
I try to fix @stylex/nextjjs-plugin to make available with next compiler, and I notice that error occurs when webpack plugin passed value contains ! character to webpack-loader as options via NormalModule.getCompilationHooks. @stylex/nextjjs-plugin pass css style object to loader and they can have ! like !important syntax.
I'm not sure that it's matter of Next Compiler but, it doesn't happen with custom babel configuration. So, I would like to ask it's for Next Compiler.
This issue has been automatically marked as stale due to inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you.
This issue has been automatically closed due to inactivity. If you’re still experiencing a similar problem or have additional details to share, please open a new issue following our current issue template. Your updated report helps us investigate and address concerns more efficiently. Thank you for your understanding!