cssLoader.issuer field removal is causing build processes depending on it to fail
See original GitHub issueVerify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64 Binaries: Node: 16.18.0 npm: 8.19.2 Yarn: 3.1.1 pnpm: N/A Relevant packages: next: 13.0.1 eslint-config-next: 13.0.1 react: 18.2.0 react-dom: 18.2.0
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Nx
Describe the Bug
Upgrading from next@13.0.0
to next@13.0.1
will cause the following packages that rely on NextJs to fail:
next-transpile-modules
- Nx plugin for NextJs
The reason being that these two dependencies (and probably others) rely on the cssLoader.issuer
field that has been removed in this PR: https://github.com/vercel/next.js/pull/42106/files
Both next-transpile-modules
and Nx plugin for NextJs seem to rely on this field to perform the bundling.
Expected Behavior
The build process should work (as per next@13.0.0
). However, the build processes fails with next@13.0.1
due to the removal of the issuer
field in the exposed CSS loader.
Link to reproduction
https://github.com/terrymun/nextjs-cssloader-issuer
To Reproduce
- Checkout the repository at https://github.com/terrymun/nextjs-cssloader-issuer
- Notice that
next-transpile-modules
has been installed and is used to transpilelodash
as an example - Run
npm run dev
. The error message will appearTypeError: Cannot read properties of undefined (reading 'and')
, as theissuer
field has been removed as ofnext@13.0.1
- Downgrade to
next@13.0.0
by runningnpm install -D next@13.0.0
- Rerun
npm run dev
, and notice the server starts normally.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
@martpie confirmed working on my side after upgrading to
next-transpile-modules@10.0.0
. Many thanks for super fast turnaround 😃Fixed in
next-transpile-modules@10.0.0
, cheers!