Skip to content

Commit bd5b329

Browse files
authored
update(nx): to v14.5.10 (#29)
* update(nx): 1st step migrating to v14.5.10 * update(nx): 2nd step migrating to v14.5.10 * update(nx): 3rd step migrating to v14.5.10 * update(nx): 4th step migrating to v14.5.10
1 parent f68d105 commit bd5b329

29 files changed

+8364
-7691
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ tsconfig.tsbuildinfo
4242
# System Files
4343
.DS_Store
4444
Thumbs.db
45+
46+
# Next.js
47+
.next

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps=true

.storybook/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const { appRootPath } = require('@nrwl/tao/src/utils/app-root');
1+
const { workspaceRoot } = require('nx/src/utils/workspace-root');
22

3-
const configStorybook = require(`${appRootPath}/tools/config/webpack/storybook`);
3+
const configStorybook = require(`${workspaceRoot}/tools/config/webpack/storybook`);
44

55
module.exports = {
66
stories: [],

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NxNextjs
22

3-
This project was generated using [Nx](https://nx.dev/) ([v14.4.2](https://github.com/nrwl/nx/releases/tag/v14.4.2))
3+
This project was generated using [Nx](https://nx.dev/) ([v14.5.10](https://github.com/nrwl/nx/releases/tag/14.5.10))
44

55
ℹ️  use the [node.js](https://nodejs.org/en/) v16 LTS
66

@@ -92,6 +92,8 @@ This project was generated using [Nx](https://nx.dev/) ([v14.4.2](https://github
9292

9393
- with the `NODE_ENV=production` that will trigger the Tailwind css purge
9494

95+
- `NODE_ENV=production nx export nextjs --prod`
96+
9597
- test exported: `npx serve dist/apps/nextjs/exported`
9698

9799
- lint: `nx lint nextjs`

apps/app-e2e/cypress.config.ts

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { defineConfig } from 'cypress';
2+
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
3+
import setupNodeEvents from './src/plugins/index';
4+
5+
const cypressJsonConfig = {
6+
fileServerFolder: '.',
7+
fixturesFolder: './src/fixtures',
8+
video: true,
9+
videosFolder: '../../dist/cypress/apps/app-e2e/videos',
10+
screenshotsFolder: '../../dist/cypress/apps/app-e2e/screenshots',
11+
chromeWebSecurity: false,
12+
specPattern: 'src/e2e/**/*.cy.{js,jsx,ts,tsx}',
13+
supportFile: 'src/support/e2e.ts',
14+
};
15+
export default defineConfig({
16+
e2e: {
17+
...nxE2EPreset(__dirname),
18+
...cypressJsonConfig,
19+
setupNodeEvents,
20+
},
21+
});

apps/app-e2e/cypress.json

-12
This file was deleted.
File renamed without changes.
File renamed without changes.

apps/app-e2e/tsconfig.e2e.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"allowJs": true,
77
"types": ["cypress", "node"]
88
},
9-
"include": ["src/**/*.ts", "src/**/*.js"]
9+
"include": ["src/**/*.ts", "src/**/*.js", "cypress.config.ts"]
1010
}

apps/nextjs-e2e/cypress.config.ts

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { defineConfig } from 'cypress';
2+
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
3+
import setupNodeEvents from './src/plugins/index';
4+
5+
const cypressJsonConfig = {
6+
fileServerFolder: '.',
7+
fixturesFolder: './src/fixtures',
8+
video: true,
9+
videosFolder: '../../dist/cypress/apps/nextjs-e2e/videos',
10+
screenshotsFolder: '../../dist/cypress/apps/nextjs-e2e/screenshots',
11+
chromeWebSecurity: false,
12+
specPattern: 'src/e2e/**/*.cy.{js,jsx,ts,tsx}',
13+
supportFile: 'src/support/e2e.ts',
14+
};
15+
export default defineConfig({
16+
e2e: {
17+
...nxE2EPreset(__dirname),
18+
...cypressJsonConfig,
19+
setupNodeEvents,
20+
},
21+
});

apps/nextjs-e2e/cypress.json

-12
This file was deleted.
File renamed without changes.
File renamed without changes.

apps/nextjs-e2e/tsconfig.e2e.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"allowJs": true,
77
"types": ["cypress", "node"]
88
},
9-
"include": ["src/**/*.ts", "src/**/*.js"]
9+
"include": ["src/**/*.ts", "src/**/*.js", "cypress.config.ts"]
1010
}

apps/nextjs/next.config.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
const { appRootPath } = require('@nrwl/tao/src/utils/app-root');
2-
const withNx = require(`${appRootPath}/tools/config/nextjs`)(__dirname);
1+
const { workspaceRoot } = require('nx/src/utils/workspace-root');
2+
3+
const withNx = require(`${workspaceRoot}/tools/config/nextjs`)(__dirname);
34

45
module.exports = withNx({
56
swcMinify: true,

apps/nextjs/tailwind.config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
const { appRootPath } = require('@nrwl/tao/src/utils/app-root');
1+
const { workspaceRoot } = require('nx/src/utils/workspace-root');
22

33
const {
44
PURGE_MATCH_FILES,
5-
} = require(`${appRootPath}/tools/config/tailwind/definitions`);
6-
const configTailwind = require(`${appRootPath}/tools/config/tailwind`);
5+
} = require(`${workspaceRoot}/tools/config/tailwind/definitions`);
6+
const configTailwind = require(`${workspaceRoot}/tools/config/tailwind`);
77

88
module.exports = configTailwind({
99
content: [`${__dirname}/src/${PURGE_MATCH_FILES}`],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { defineConfig } from 'cypress';
2+
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
3+
import setupNodeEvents from './src/plugins/index';
4+
5+
const cypressJsonConfig = {
6+
fileServerFolder: '.',
7+
fixturesFolder: './src/fixtures',
8+
video: true,
9+
videosFolder: '../../dist/cypress/apps/shared-components-e2e/videos',
10+
screenshotsFolder:
11+
'../../dist/cypress/apps/shared-components-e2e/screenshots',
12+
chromeWebSecurity: false,
13+
baseUrl: 'http://localhost:4400',
14+
specPattern: 'src/e2e/**/*.cy.{js,jsx,ts,tsx}',
15+
supportFile: 'src/support/e2e.ts',
16+
};
17+
export default defineConfig({
18+
e2e: {
19+
...nxE2EPreset(__dirname),
20+
...cypressJsonConfig,
21+
setupNodeEvents,
22+
},
23+
});

apps/shared-components-e2e/cypress.json

-13
This file was deleted.

apps/shared-components-e2e/tsconfig.e2e.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"allowJs": true,
77
"types": ["cypress", "node"]
88
},
9-
"include": ["src/**/*.ts", "src/**/*.js"]
9+
"include": ["src/**/*.ts", "src/**/*.js", "cypress.config.ts"]
1010
}

0 commit comments

Comments
 (0)