Skip to content

Commit

Permalink
fix(nextjs): error in with-nx.ts (#12973)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasblanchard-dev committed Nov 7, 2022
1 parent f583689 commit 4994223
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/next/plugins/with-nx.ts
Expand Up @@ -79,7 +79,7 @@ export function withNx(
rule.sideEffects === false && regexEqual(rule.test, /\.module\.css$/)
);
// Might not be found if Next.js webpack config changes in the future
if (nextCssLoader) {
if (nextCssLoader && nextCssLoader.issuer) {
nextCssLoader.issuer.or = nextCssLoader.issuer.and
? nextCssLoader.issuer.and.concat(includes)
: includes;
Expand All @@ -95,7 +95,7 @@ export function withNx(
regexEqual(rule.test, /\.module\.(scss|sass)$/)
);
// Might not be found if Next.js webpack config changes in the future
if (nextSassLoader) {
if (nextSassLoader && nextSassLoader.issuer) {
nextSassLoader.issuer.or = nextSassLoader.issuer.and
? nextSassLoader.issuer.and.concat(includes)
: includes;
Expand Down Expand Up @@ -130,7 +130,7 @@ export function withNx(
)
);
// Might not be found if Next.js webpack config changes in the future
if (nextGlobalCssLoader) {
if (nextGlobalCssLoader && nextGlobalCssLoader.issuer) {
nextGlobalCssLoader.issuer.or = nextGlobalCssLoader.issuer.and
? nextGlobalCssLoader.issuer.and.concat(includes)
: includes;
Expand Down

0 comments on commit 4994223

Please sign in to comment.