@nx/next 17.0.1 → 17.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/next",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.",
|
|
6
6
|
"repository": {
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"url-loader": "^4.1.1",
|
|
45
45
|
"tslib": "^2.3.0",
|
|
46
46
|
"webpack-merge": "^5.8.0",
|
|
47
|
-
"@nx/devkit": "17.0.
|
|
48
|
-
"@nx/js": "17.0.
|
|
49
|
-
"@nx/eslint": "17.0.
|
|
50
|
-
"@nx/react": "17.0.
|
|
51
|
-
"@nx/web": "17.0.
|
|
52
|
-
"@nx/workspace": "17.0.
|
|
53
|
-
"@nrwl/next": "17.0.
|
|
47
|
+
"@nx/devkit": "17.0.3",
|
|
48
|
+
"@nx/js": "17.0.3",
|
|
49
|
+
"@nx/eslint": "17.0.3",
|
|
50
|
+
"@nx/react": "17.0.3",
|
|
51
|
+
"@nx/web": "17.0.3",
|
|
52
|
+
"@nx/workspace": "17.0.3",
|
|
53
|
+
"@nrwl/next": "17.0.3"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
package/plugins/with-nx.js
CHANGED
|
@@ -152,7 +152,7 @@ function withNx(_nextConfig = {}, context = getWithNxContext()) {
|
|
|
152
152
|
: joinPathFragments(outputDir, '.next');
|
|
153
153
|
}
|
|
154
154
|
const userWebpackConfig = nextConfig.webpack;
|
|
155
|
-
const { createWebpackConfig } = require('
|
|
155
|
+
const { createWebpackConfig } = require('@nx/next/src/utils/config');
|
|
156
156
|
nextConfig.webpack = (a, b) => createWebpackConfig(workspaceRoot, projectDirectory, options.fileReplacements, options.assets)(userWebpackConfig ? userWebpackConfig(a, b) : a, b);
|
|
157
157
|
return nextConfig;
|
|
158
158
|
}
|
|
@@ -6,16 +6,22 @@ const eslint_1 = require("@nx/eslint");
|
|
|
6
6
|
const versions_1 = require("../../../utils/versions");
|
|
7
7
|
async function addE2e(host, options) {
|
|
8
8
|
if (options.e2eTestRunner === 'cypress') {
|
|
9
|
-
const {
|
|
10
|
-
|
|
9
|
+
const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/cypress', versions_1.nxVersion);
|
|
10
|
+
(0, devkit_1.addProjectConfiguration)(host, options.e2eProjectName, {
|
|
11
|
+
root: options.e2eProjectRoot,
|
|
12
|
+
sourceRoot: (0, devkit_1.joinPathFragments)(options.e2eProjectRoot, 'src'),
|
|
13
|
+
targets: {},
|
|
14
|
+
tags: [],
|
|
15
|
+
implicitDependencies: [options.projectName],
|
|
16
|
+
});
|
|
17
|
+
return configurationGenerator(host, {
|
|
11
18
|
...options,
|
|
12
19
|
linter: eslint_1.Linter.EsLint,
|
|
13
|
-
|
|
14
|
-
directory:
|
|
15
|
-
// the name and root are already normalized, instruct the generator to use them as is
|
|
16
|
-
projectNameAndRootFormat: 'as-provided',
|
|
17
|
-
project: options.projectName,
|
|
20
|
+
project: options.e2eProjectName,
|
|
21
|
+
directory: 'src',
|
|
18
22
|
skipFormat: true,
|
|
23
|
+
devServerTarget: `${options.projectName}:serve`,
|
|
24
|
+
jsx: true,
|
|
19
25
|
});
|
|
20
26
|
}
|
|
21
27
|
else if (options.e2eTestRunner === 'playwright') {
|
|
@@ -51,7 +51,7 @@ async function customServerGenerator(host, options) {
|
|
|
51
51
|
};
|
|
52
52
|
project.targets['serve-custom-server'] = {
|
|
53
53
|
executor: '@nx/js:node',
|
|
54
|
-
defaultConfiguration: '
|
|
54
|
+
defaultConfiguration: 'production',
|
|
55
55
|
options: {
|
|
56
56
|
buildTarget: `${options.project}:build-custom-server`,
|
|
57
57
|
},
|
|
@@ -12,6 +12,7 @@ async function cypressComponentConfiguration(tree, options) {
|
|
|
12
12
|
tasks.push(await baseCyCtConfig(tree, {
|
|
13
13
|
project: options.project,
|
|
14
14
|
skipFormat: true,
|
|
15
|
+
jsx: true,
|
|
15
16
|
}));
|
|
16
17
|
const { webpackInitGenerator } = (0, devkit_1.ensurePackage)('@nx/webpack', versions_1.nxVersion);
|
|
17
18
|
tasks.push(await webpackInitGenerator(tree, {
|