Skip to content

Commit

Permalink
fix(nextjs): adjust generated CSS-in-JS to match latest Next.js recom…
Browse files Browse the repository at this point in the history
…mendations (#17294)
  • Loading branch information
jaysoo authored May 30, 2023
1 parent 911f753 commit a7c6d5a
Show file tree
Hide file tree
Showing 11 changed files with 420 additions and 135 deletions.
7 changes: 0 additions & 7 deletions e2e/next/src/next-appdir.test.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
import {
cleanupProject,
isNotWindows,
killPorts,
newProject,
runCLI,
runCommandUntil,
tmpProjPath,
uniq,
updateFile,
} from '@nx/e2e/utils';
import { getData } from 'ajv/dist/compile/validate';
import { detectPackageManager } from 'nx/src/utils/package-manager';
import { checkApp } from './utils';
import { p } from 'vitest/dist/types-b7007192';

describe('Next.js App Router', () => {
let proj: string;
Expand Down
13 changes: 13 additions & 0 deletions e2e/next/src/next-styles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,19 @@ describe('Next.js apps', () => {
checkExport: false,
});

const scAppWithAppRouter = uniq('app');

runCLI(
`generate @nx/next:app ${scAppWithAppRouter} --no-interactive --style=styled-components --appDir=true`
);

await checkApp(scAppWithAppRouter, {
checkUnitTest: false, // No unit tests for app router
checkLint: false,
checkE2E: false,
checkExport: false,
});

const emotionApp = uniq('app');

runCLI(
Expand Down
Loading

1 comment on commit a7c6d5a

@vercel
Copy link

@vercel vercel bot commented on a7c6d5a May 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx.dev

Please sign in to comment.