@nx/next 23.0.0-beta.1 → 23.0.0-beta.11

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.
Files changed (92) hide show
  1. package/index.d.ts +0 -1
  2. package/index.d.ts.map +1 -1
  3. package/index.js +1 -3
  4. package/package.json +13 -13
  5. package/plugins/with-nx.d.ts.map +1 -1
  6. package/plugins/with-nx.js +3 -11
  7. package/src/executors/build/build.impl.d.ts.map +1 -1
  8. package/src/executors/build/build.impl.js +3 -2
  9. package/src/executors/build/schema.json +1 -0
  10. package/src/executors/server/schema.json +1 -0
  11. package/src/executors/server/server.impl.d.ts.map +1 -1
  12. package/src/executors/server/server.impl.js +4 -2
  13. package/src/generators/application/application.d.ts.map +1 -1
  14. package/src/generators/application/application.js +2 -17
  15. package/src/generators/application/files/app/page.tsx__tmpl__ +4 -16
  16. package/src/generators/application/files/common/__dot__babelrc +2 -19
  17. package/src/generators/application/files/common/index.d.ts__tmpl__ +0 -7
  18. package/src/generators/application/files/common/next.config.js__tmpl__ +0 -56
  19. package/src/generators/application/files/common/tsconfig.json__tmpl__ +0 -1
  20. package/src/generators/application/files/pages/__fileName__.tsx__tmpl__ +4 -13
  21. package/src/generators/application/lib/add-e2e.d.ts.map +1 -1
  22. package/src/generators/application/lib/add-e2e.js +4 -6
  23. package/src/generators/application/lib/add-project.d.ts.map +1 -1
  24. package/src/generators/application/lib/add-project.js +4 -2
  25. package/src/generators/application/lib/create-application-files.d.ts.map +1 -1
  26. package/src/generators/application/lib/create-application-files.js +2 -21
  27. package/src/generators/application/lib/normalize-options.d.ts +0 -1
  28. package/src/generators/application/lib/normalize-options.d.ts.map +1 -1
  29. package/src/generators/application/lib/normalize-options.js +3 -7
  30. package/src/generators/application/schema.json +2 -21
  31. package/src/generators/component/component.d.ts.map +1 -1
  32. package/src/generators/component/component.js +2 -2
  33. package/src/generators/component/schema.json +2 -21
  34. package/src/generators/convert-to-inferred/convert-to-inferred.js +4 -5
  35. package/src/generators/convert-to-inferred/lib/build-post-target-transformer.d.ts +1 -1
  36. package/src/generators/convert-to-inferred/lib/build-post-target-transformer.d.ts.map +1 -1
  37. package/src/generators/convert-to-inferred/lib/build-post-target-transformer.js +6 -6
  38. package/src/generators/convert-to-inferred/lib/serve-post-target-tranformer.d.ts +1 -2
  39. package/src/generators/convert-to-inferred/lib/serve-post-target-tranformer.d.ts.map +1 -1
  40. package/src/generators/convert-to-inferred/lib/update-next-config.d.ts +1 -1
  41. package/src/generators/convert-to-inferred/lib/update-next-config.d.ts.map +1 -1
  42. package/src/generators/init/init.d.ts.map +1 -1
  43. package/src/generators/init/init.js +2 -2
  44. package/src/generators/library/lib/normalize-options.js +3 -3
  45. package/src/generators/library/library.d.ts.map +1 -1
  46. package/src/generators/library/library.js +0 -6
  47. package/src/generators/library/schema.json +2 -21
  48. package/src/generators/page/page.d.ts.map +1 -1
  49. package/src/generators/page/page.js +7 -6
  50. package/src/generators/page/schema.json +2 -17
  51. package/src/migrations/update-22-0-0/add-svgr-to-next-config.d.ts.map +1 -1
  52. package/src/migrations/update-22-0-0/add-svgr-to-next-config.js +2 -2
  53. package/src/plugins/plugin.d.ts.map +1 -1
  54. package/src/plugins/plugin.js +15 -23
  55. package/src/utils/deprecation.d.ts +6 -0
  56. package/src/utils/deprecation.d.ts.map +1 -0
  57. package/src/utils/deprecation.js +25 -0
  58. package/src/utils/styles.d.ts +0 -62
  59. package/src/utils/styles.d.ts.map +1 -1
  60. package/src/utils/styles.js +4 -50
  61. package/src/utils/versions.d.ts +1 -4
  62. package/src/utils/versions.d.ts.map +1 -1
  63. package/src/utils/versions.js +2 -5
  64. package/tailwind.d.ts +3 -5
  65. package/tailwind.d.ts.map +1 -1
  66. package/tailwind.js +36 -11
  67. package/src/generators/application/files/app-styled-components/layout.tsx__tmpl__ +0 -21
  68. package/src/generators/application/files/app-styled-components/registry.tsx__tmpl__ +0 -33
  69. package/src/generators/application/files/app-styled-jsx/layout.tsx__tmpl__ +0 -16
  70. package/src/generators/application/files/app-styled-jsx/registry.tsx__tmpl__ +0 -23
  71. package/src/generators/application/files/pages/_document.tsx__tmpl__ +0 -33
  72. package/src/generators/application/lib/show-possible-warnings.d.ts +0 -4
  73. package/src/generators/application/lib/show-possible-warnings.d.ts.map +0 -1
  74. package/src/generators/application/lib/show-possible-warnings.js +0 -9
  75. package/src/generators/setup-tailwind/files/postcss.config.js__tmpl__ +0 -15
  76. package/src/generators/setup-tailwind/files/tailwind.config.js__tmpl__ +0 -23
  77. package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts +0 -4
  78. package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts.map +0 -1
  79. package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.js +0 -27
  80. package/src/generators/setup-tailwind/lib/update-project.d.ts +0 -4
  81. package/src/generators/setup-tailwind/lib/update-project.d.ts.map +0 -1
  82. package/src/generators/setup-tailwind/lib/update-project.js +0 -11
  83. package/src/generators/setup-tailwind/schema.d.ts +0 -7
  84. package/src/generators/setup-tailwind/schema.d.ts.map +0 -1
  85. package/src/generators/setup-tailwind/schema.js +0 -2
  86. package/src/generators/setup-tailwind/schema.json +0 -47
  87. package/src/generators/setup-tailwind/setup-tailwind.d.ts +0 -5
  88. package/src/generators/setup-tailwind/setup-tailwind.d.ts.map +0 -1
  89. package/src/generators/setup-tailwind/setup-tailwind.js +0 -35
  90. package/src/utils/generate-globs.d.ts +0 -6
  91. package/src/utils/generate-globs.d.ts.map +0 -1
  92. package/src/utils/generate-globs.js +0 -28
package/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './src/utils/types';
2
- export { createGlobPatternsOfDependentProjects } from './src/utils/generate-globs';
3
2
  export { applicationGenerator } from './src/generators/application/application';
4
3
  export { componentGenerator } from './src/generators/component/component';
5
4
  export { libraryGenerator } from './src/generators/library/library';
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/next/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,qCAAqC,EAAE,MAAM,4BAA4B,CAAC;AAEnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/next/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC"}
package/index.js CHANGED
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.composePlugins = exports.withNx = exports.pageGenerator = exports.libraryGenerator = exports.componentGenerator = exports.applicationGenerator = exports.createGlobPatternsOfDependentProjects = void 0;
3
+ exports.composePlugins = exports.withNx = exports.pageGenerator = exports.libraryGenerator = exports.componentGenerator = exports.applicationGenerator = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  tslib_1.__exportStar(require("./src/utils/types"), exports);
6
- var generate_globs_1 = require("./src/utils/generate-globs");
7
- Object.defineProperty(exports, "createGlobPatternsOfDependentProjects", { enumerable: true, get: function () { return generate_globs_1.createGlobPatternsOfDependentProjects; } });
8
6
  var application_1 = require("./src/generators/application/application");
9
7
  Object.defineProperty(exports, "applicationGenerator", { enumerable: true, get: function () { return application_1.applicationGenerator; } });
10
8
  var component_1 = require("./src/generators/component/component");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/next",
3
- "version": "23.0.0-beta.1",
3
+ "version": "23.0.0-beta.11",
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, Playwright, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.",
6
6
  "repository": {
@@ -36,25 +36,25 @@
36
36
  "next": ">=14.0.0 <17.0.0"
37
37
  },
38
38
  "dependencies": {
39
- "@nx/devkit": "23.0.0-beta.1",
39
+ "@nx/devkit": "23.0.0-beta.11",
40
40
  "@babel/plugin-proposal-decorators": "^7.22.7",
41
- "@svgr/webpack": "^8.1.0",
41
+ "@svgr/webpack": "^8.0.1",
42
42
  "copy-webpack-plugin": "^14.0.0",
43
- "ignore": "^5.0.4",
43
+ "ignore": "^7.0.5",
44
44
  "semver": "^7.6.3",
45
45
  "tslib": "^2.3.0",
46
46
  "webpack-merge": "^5.8.0",
47
- "@nx/js": "23.0.0-beta.1",
48
- "@nx/eslint": "23.0.0-beta.1",
49
- "@nx/react": "23.0.0-beta.1",
50
- "@nx/web": "23.0.0-beta.1",
51
- "@nx/webpack": "23.0.0-beta.1",
52
- "@phenomnomnominal/tsquery": "~6.1.4"
47
+ "@nx/js": "23.0.0-beta.11",
48
+ "@nx/eslint": "23.0.0-beta.11",
49
+ "@nx/react": "23.0.0-beta.11",
50
+ "@nx/web": "23.0.0-beta.11",
51
+ "@nx/webpack": "23.0.0-beta.11",
52
+ "@phenomnomnominal/tsquery": "~6.2.0"
53
53
  },
54
54
  "devDependencies": {
55
- "@nx/cypress": "23.0.0-beta.1",
56
- "@nx/playwright": "23.0.0-beta.1",
57
- "nx": "23.0.0-beta.1"
55
+ "@nx/cypress": "23.0.0-beta.11",
56
+ "@nx/playwright": "23.0.0-beta.11",
57
+ "nx": "23.0.0-beta.11"
58
58
  },
59
59
  "publishConfig": {
60
60
  "access": "public"
@@ -1 +1 @@
1
- {"version":3,"file":"with-nx.d.ts","sourceRoot":"","sources":["../../../../packages/next/plugins/with-nx.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAGL,KAAK,uBAAuB,EAE7B,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,EAAE,CAAC,EAAE;QACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,gBAAgB,CAAC,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;QACvD,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;KAC7B,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AA+ED;;GAEG;AACH,iBAAS,MAAM,CACb,WAAW,GAAS,aAAa,EACjC,OAAO,GAAE,aAAkC,GAC1C,YAAY,CA4Hd;AAED,wBAAgB,aAAa,CAC3B,UAAU,GAAS,aAAa,EAChC,OAAO,GAAE,aAAkC,GAC1C,UAAU,CAiIZ;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,uBAAuB,EAC7B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAC9B,IAAI,GAAG,MAAM,CAcf;AAGD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,IAAI,QAM3D;AASD,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"with-nx.d.ts","sourceRoot":"","sources":["../../../../packages/next/plugins/with-nx.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAGL,KAAK,uBAAuB,EAE7B,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,EAAE,CAAC,EAAE;QACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,gBAAgB,CAAC,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;QACvD,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;KAC7B,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AA+ED;;GAEG;AACH,iBAAS,MAAM,CACb,WAAW,GAAS,aAAa,EACjC,OAAO,GAAE,aAAkC,GAC1C,YAAY,CAkHd;AAED,wBAAgB,aAAa,CAC3B,UAAU,GAAS,aAAa,EAChC,OAAO,GAAE,aAAkC,GAC1C,UAAU,CAiIZ;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,uBAAuB,EAC7B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAC9B,IAAI,GAAG,MAAM,CAcf;AAGD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,IAAI,QAM3D;AASD,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -112,17 +112,9 @@ function withNx(_nextConfig = {}, context = getWithNxContext()) {
112
112
  };
113
113
  }
114
114
  else {
115
- const { createProjectGraphAsync, joinPathFragments, offsetFromRoot, workspaceRoot, } = require('@nx/devkit');
116
- let graph;
117
- try {
118
- graph = await createProjectGraphAsync({
119
- exitOnError: false,
120
- resetDaemonClient: true,
121
- });
122
- }
123
- catch (e) {
124
- throw new Error('Could not create project graph. Please ensure that your workspace is valid.', { cause: e });
125
- }
115
+ const { readCachedProjectGraph, joinPathFragments, offsetFromRoot, workspaceRoot, } = require('@nx/devkit');
116
+ // Since this is invoked by an Nx task, the graph is already cached.
117
+ const graph = readCachedProjectGraph();
126
118
  const originalTarget = {
127
119
  project: process.env.NX_TASK_TARGET_PROJECT,
128
120
  target: process.env.NX_TASK_TARGET_TARGET,
@@ -1 +1 @@
1
- {"version":3,"file":"build.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/build/build.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAKhB,MAAM,YAAY,CAAC;AAWpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAQ5D,wBAA8B,aAAa,CACzC,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,eAAe;;GAoGzB"}
1
+ {"version":3,"file":"build.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/build/build.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAKhB,MAAM,YAAY,CAAC;AAUpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAS5D,wBAA8B,aAAa,CACzC,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,eAAe;;GAsGzB"}
@@ -7,7 +7,6 @@ const path_1 = require("path");
7
7
  const node_fs_1 = require("node:fs");
8
8
  const promises_1 = require("node:fs/promises");
9
9
  const semver_1 = require("semver");
10
- const semver_2 = require("@nx/devkit/src/utils/semver");
11
10
  const update_package_json_1 = require("./lib/update-package-json");
12
11
  const create_next_config_file_1 = require("./lib/create-next-config-file");
13
12
  const check_project_1 = require("./lib/check-project");
@@ -15,8 +14,10 @@ const child_process_1 = require("child_process");
15
14
  const create_cli_options_1 = require("../../utils/create-cli-options");
16
15
  const internal_1 = require("@nx/devkit/internal");
17
16
  const runtime_version_utils_1 = require("../../utils/runtime-version-utils");
17
+ const deprecation_1 = require("../../utils/deprecation");
18
18
  let childProcess;
19
19
  async function buildExecutor(options, context) {
20
+ (0, deprecation_1.warnNextBuildExecutorDeprecation)();
20
21
  // Cast to any to overwrite NODE_ENV
21
22
  process.env.NODE_ENV ||= 'production';
22
23
  const projectRoot = context.projectGraph.nodes[context.projectName].data.root;
@@ -30,7 +31,7 @@ async function buildExecutor(options, context) {
30
31
  const reactDomVersion = packageJson?.dependencies?.['react-dom'] ??
31
32
  rootPackageJson.dependencies?.['react-dom'];
32
33
  const hasReact18 = reactDomVersion &&
33
- (0, semver_1.gte)((0, semver_2.checkAndCleanWithSemver)('react-dom', reactDomVersion), '18.0.0');
34
+ (0, semver_1.gte)((0, internal_1.checkAndCleanWithSemver)('react-dom', reactDomVersion), '18.0.0');
34
35
  if (hasReact18) {
35
36
  process.env['__NEXT_REACT_ROOT'] ||= 'true';
36
37
  }
@@ -6,6 +6,7 @@
6
6
  "title": "Next Build",
7
7
  "description": "Build a Next.js app.",
8
8
  "type": "object",
9
+ "x-deprecated": "The `@nx/next:build` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/next:convert-to-inferred` to migrate to the `@nx/next/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
9
10
  "properties": {
10
11
  "outputPath": {
11
12
  "type": "string",
@@ -6,6 +6,7 @@
6
6
  "title": "Next Serve",
7
7
  "description": "Serve a Next.js app.",
8
8
  "type": "object",
9
+ "x-deprecated": "The `@nx/next:server` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/next:convert-to-inferred` to migrate to the `@nx/next/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
9
10
  "properties": {
10
11
  "dev": {
11
12
  "type": "boolean",
@@ -1 +1 @@
1
- {"version":3,"file":"server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/server/server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAIhB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAEL,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAQ3B,wBAA+B,aAAa,CAC1C,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,eAAe;;;cAqHzB"}
1
+ {"version":3,"file":"server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/server/server.impl.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAIhB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAEL,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAQ3B,wBAA+B,aAAa,CAC1C,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,eAAe;;;cAuHzB"}
@@ -2,15 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = serveExecutor;
4
4
  const tslib_1 = require("tslib");
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
7
  const path_1 = require("path");
7
8
  const child_process_1 = require("child_process");
8
9
  const custom_server_impl_1 = tslib_1.__importDefault(require("./custom-server.impl"));
9
10
  const create_cli_options_1 = require("../../utils/create-cli-options");
10
- const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
11
11
  const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
12
12
  const runtime_version_utils_1 = require("../../utils/runtime-version-utils");
13
+ const deprecation_1 = require("../../utils/deprecation");
13
14
  async function* serveExecutor(options, context) {
15
+ (0, deprecation_1.warnNextServerExecutorDeprecation)();
14
16
  const buildOptions = (0, devkit_1.readTargetOptions)((0, devkit_1.parseTargetString)(options.buildTarget, context), context);
15
17
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
16
18
  // This is required for the default custom server to work. See the @nx/next:app generator.
@@ -64,7 +66,7 @@ async function* serveExecutor(options, context) {
64
66
  }
65
67
  }
66
68
  const nextBin = require.resolve('next/dist/bin/next');
67
- yield* (0, async_iterable_1.createAsyncIterable)(async ({ done, next, error }) => {
69
+ yield* (0, internal_1.createAsyncIterable)(async ({ done, next, error }) => {
68
70
  const server = (0, child_process_1.fork)(nextBin, [
69
71
  mode,
70
72
  ...args,
@@ -1 +1 @@
1
- {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/next/src/generators/application/application.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAIjB,IAAI,EACL,MAAM,YAAY,CAAC;AAUpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAwBlC,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAMpE;AAED,wBAAsB,4BAA4B,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAmI5E"}
1
+ {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/next/src/generators/application/application.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,iBAAiB,EAGjB,IAAI,EACL,MAAM,YAAY,CAAC;AASpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAsBlC,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAMpE;AAED,wBAAsB,4BAA4B,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAkH5E"}
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.applicationGenerator = applicationGenerator;
4
4
  exports.applicationGeneratorInternal = applicationGeneratorInternal;
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
7
  const js_1 = require("@nx/js");
7
- const setup_tailwind_1 = require("../setup-tailwind/setup-tailwind");
8
8
  const versions_1 = require("@nx/react/src/utils/versions");
9
9
  const version_utils_1 = require("@nx/react/src/utils/version-utils");
10
10
  const normalize_options_1 = require("./lib/normalize-options");
@@ -18,14 +18,11 @@ const styles_1 = require("../../utils/styles");
18
18
  const add_linting_1 = require("./lib/add-linting");
19
19
  const custom_server_1 = require("../custom-server/custom-server");
20
20
  const update_cypress_tsconfig_1 = require("./lib/update-cypress-tsconfig");
21
- const show_possible_warnings_1 = require("./lib/show-possible-warnings");
22
21
  const versions_2 = require("../../utils/versions");
23
- const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
24
22
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
25
23
  const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
26
24
  const add_swc_to_custom_server_1 = require("../../utils/add-swc-to-custom-server");
27
25
  const jest_config_util_1 = require("../../utils/jest-config-util");
28
- const version_utils_2 = require("../../utils/version-utils");
29
26
  async function applicationGenerator(host, schema) {
30
27
  return await applicationGeneratorInternal(host, {
31
28
  addPlugin: false,
@@ -46,7 +43,6 @@ async function applicationGeneratorInternal(host, schema) {
46
43
  });
47
44
  tasks.push(jsInitTask);
48
45
  const options = await (0, normalize_options_1.normalizeOptions)(host, schema);
49
- (0, show_possible_warnings_1.showPossibleWarnings)(host, options);
50
46
  const nextTask = await (0, init_1.nextInitGenerator)(host, {
51
47
  ...options,
52
48
  skipFormat: true,
@@ -65,17 +61,6 @@ async function applicationGeneratorInternal(host, schema) {
65
61
  tasks.push(e2eTask);
66
62
  const jestTask = await (0, add_jest_1.addJest)(host, options);
67
63
  tasks.push(jestTask);
68
- if (options.style === 'tailwind') {
69
- const tailwindTask = await (0, setup_tailwind_1.setupTailwindGenerator)(host, {
70
- project: options.projectName,
71
- });
72
- tasks.push(tailwindTask);
73
- }
74
- // LESS is not currrently supported with Turbopack
75
- // Turbopack is default in Next 16, set to webpack
76
- if (options.style === 'less' && (await (0, version_utils_2.isNext16)(host))) {
77
- devkit_1.logger.warn("NX LESS is only supported with Webpack bundler. Please ensure you run your application with '--webpack'.");
78
- }
79
64
  const styledTask = (0, styles_1.addStyleDependencies)(host, {
80
65
  style: options.style,
81
66
  swc: !host.exists((0, devkit_1.joinPathFragments)(options.appProjectRoot, '.babelrc')),
@@ -118,7 +103,7 @@ async function applicationGeneratorInternal(host, schema) {
118
103
  await (0, devkit_1.formatFiles)(host);
119
104
  }
120
105
  tasks.push(() => {
121
- (0, log_show_project_command_1.logShowProjectCommand)(options.projectName);
106
+ (0, internal_1.logShowProjectCommand)(options.projectName);
122
107
  });
123
108
  return (0, devkit_1.runTasksInSerial)(...tasks);
124
109
  }
@@ -1,17 +1,6 @@
1
- <%_ if (style !== 'none') { _%>
2
- <%_ if (styledModule && (styledModule === 'styled-jsx' || styledModule === 'styled-components')) { _%>
3
- 'use client';
4
- <%_ } _%>
5
- <%_ if (styledModule && styledModule !== 'styled-jsx') { var wrapper = 'StyledPage'; _%>
6
- import styled from '<%= styledModule %>';
7
- <%_ } else { var wrapper = 'div'; _%>
8
- <%- (style !== 'styled-jsx' && style !== 'tailwind') ? `import styles from './page.module.${style}';` : '' %>
9
- <%_ } _%>
10
-
11
- <%_ if (styledModule && styledModule !== 'styled-jsx') { _%>
12
- const StyledPage = styled.div`<%- pageStyleContent %>`;
13
- <%_ } _%>
14
- <% } %>
1
+ <%_ if (style !== 'none') { var wrapper = 'div'; _%>
2
+ import styles from './page.module.<%= style %>';
3
+ <% } else { var wrapper = 'div'; } %>
15
4
  export default function Index() {
16
5
  /*
17
6
  * Replace the elements below with your own.
@@ -19,8 +8,7 @@ export default function Index() {
19
8
  * Note: The corresponding styles are in the ./<%= fileName %>.<%= style %> file.
20
9
  */
21
10
  return (
22
- <<%= wrapper %><% if (!styledModule && style !== 'tailwind') {%> className={styles.page}<% } %>>
23
- <%- styledModule === 'styled-jsx' && style !== 'none' ? `<style jsx>{\`${pageStyleContent}\`}</style>` : `` %>
11
+ <<%= wrapper %><% if (style !== 'none') {%> className={styles.page}<% } %>>
24
12
  <%- appContent %>
25
13
  </<%= wrapper %>>
26
14
  );
@@ -1,21 +1,4 @@
1
1
  {
2
- "presets": [
3
- <% if (style === '@emotion/styled') { %>
4
- [
5
- "@nx/next/babel",
6
- {
7
- "preset-react": {
8
- "runtime": "automatic",
9
- "importSource": "@emotion/react"
10
- }
11
- }
12
- ]
13
- <% } else { %>
14
- "@nx/next/babel"
15
- <% } %>
16
- ],
17
- "plugins": [
18
- <% if (style === '@emotion/styled') { %>"@emotion/babel-plugin"<% } %>
19
- <% if (style === 'styled-components') { %>["styled-components", { "pure": true, "ssr": true }]<% } %>
20
- ]
2
+ "presets": ["@nx/next/babel"],
3
+ "plugins": []
21
4
  }
@@ -4,10 +4,3 @@ declare module '*.svg' {
4
4
  export const ReactComponent: any;
5
5
  export default content;
6
6
  }
7
-
8
- <% if (style === 'less') { %>
9
- declare module '*.module.less' {
10
- const classes: { readonly [key: string]: string };
11
- export default classes;
12
- }
13
- <% } %>
@@ -3,61 +3,6 @@
3
3
  // eslint-disable-next-line @typescript-eslint/no-var-requires
4
4
  const { composePlugins, withNx } = require('@nx/next');
5
5
 
6
- <% if (style === 'less') { %>
7
- // This plugin is needed until this PR is merged.
8
- // https://github.com/vercel/next.js/pull/23185
9
- const { withLess } = require('@nx/next/plugins/with-less');
10
-
11
- /**
12
- * @type {import('@nx/next/plugins/with-nx').WithNxOptions}
13
- **/
14
- const nextConfig = {
15
- // Use this to set Nx-specific options
16
- // See: https://nx.dev/recipes/next/next-config-setup
17
- nx: {},
18
- };
19
-
20
- const plugins = [
21
- // Add more Next.js plugins to this list if needed.
22
- withLess,
23
- withNx,
24
- ];
25
-
26
- module.exports = composePlugins(...plugins)(nextConfig);
27
- <% } else if (
28
- style === 'styled-components'
29
- ||style === '@emotion/styled'
30
- || style === 'styled-jsx'
31
- || style === 'none'
32
- ) { %>
33
- /**
34
- * @type {import('@nx/next/plugins/with-nx').WithNxOptions}
35
- **/
36
- const nextConfig = {
37
- // Use this to set Nx-specific options
38
- // See: https://nx.dev/recipes/next/next-config-setup
39
- nx: {},
40
- <% if (style === 'styled-components') { %>
41
- compiler: {
42
- // For other options, see https://styled-components.com/docs/tooling#babel-plugin
43
- styledComponents: true,
44
- },
45
- <% } else if (style === '@emotion/styled') { %>
46
- compiler: {
47
- // For other options, see https://nextjs.org/docs/architecture/nextjs-compiler#emotion
48
- emotion: true,
49
- },
50
- <% } %>
51
- };
52
-
53
- const plugins = [
54
- // Add more Next.js plugins to this list if needed.
55
- withNx,
56
- ];
57
-
58
- module.exports = composePlugins(...plugins)(nextConfig);
59
- <% } else {
60
- // Defaults to CSS/SASS (which don't need plugin as of Next 9.3) %>
61
6
  /**
62
7
  * @type {import('@nx/next/plugins/with-nx').WithNxOptions}
63
8
  **/
@@ -73,4 +18,3 @@ const plugins = [
73
18
  ];
74
19
 
75
20
  module.exports = composePlugins(...plugins)(nextConfig);
76
- <% } %>
@@ -2,7 +2,6 @@
2
2
  "extends": "<%= rootTsConfigPath %>",
3
3
  "compilerOptions": {
4
4
  "jsx": "preserve",
5
- <% if (style === '@emotion/styled') { %>"jsxImportSource": "@emotion/react",<% } %>
6
5
  "strict": true,
7
6
  "noEmit": true,
8
7
  "emitDeclarationOnly": false,
@@ -1,14 +1,6 @@
1
- <%_ if (style !== 'none') { _%>
2
- <%_ if (styledModule && styledModule !== 'styled-jsx') { var wrapper = 'StyledPage'; _%>
3
- import styled from '<%= styledModule %>';
4
- <% } else { var wrapper = 'div';%>
5
- <%- (style !== 'styled-jsx' && style !== 'tailwind') ? `import styles from './${fileName}.module.${style}';` : '' %>
6
- <%_ } _%>
7
-
8
- <%_ if (styledModule && styledModule !== 'styled-jsx') { _%>
9
- const StyledPage = styled.div`<%- pageStyleContent %>`;
10
- <%_ } _%>
11
- <%_ } _%>
1
+ <%_ if (style !== 'none') { var wrapper = 'div'; _%>
2
+ import styles from './<%= fileName %>.module.<%= style %>';
3
+ <% } else { var wrapper = 'div'; } %>
12
4
 
13
5
  export function Index() {
14
6
  /*
@@ -17,8 +9,7 @@ export function Index() {
17
9
  * Note: The corresponding styles are in the ./<%= fileName %>.<%= style %> file.
18
10
  */
19
11
  return (
20
- <<%= wrapper %><% if (!styledModule && style !== 'tailwind') {%> className={styles.page}<% } %>>
21
- <%- styledModule === 'styled-jsx' && style !== 'none' ? `<style jsx>{\`${pageStyleContent}\`}</style>` : `` %>
12
+ <<%= wrapper %><% if (style !== 'none') {%> className={styles.page}<% } %>>
22
13
  <%- appContent %>
23
14
  </<%= wrapper %>>
24
15
  );
@@ -1 +1 @@
1
- {"version":3,"file":"add-e2e.d.ts","sourceRoot":"","sources":["../../../../../../../packages/next/src/generators/application/lib/add-e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EACJ,iBAAiB,EAElB,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,wBAAsB,MAAM,CAC1B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAmI5B"}
1
+ {"version":3,"file":"add-e2e.d.ts","sourceRoot":"","sources":["../../../../../../../packages/next/src/generators/application/lib/add-e2e.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,IAAI,EACJ,iBAAiB,EAElB,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,wBAAsB,MAAM,CAC1B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CA8H5B"}
@@ -1,18 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addE2e = addE2e;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const e2e_web_server_info_utils_1 = require("@nx/devkit/src/generators/e2e-web-server-info-utils");
6
6
  const web_1 = require("@nx/web");
7
7
  const versions_1 = require("../../../utils/versions");
8
- const version_utils_1 = require("../../../utils/version-utils");
9
8
  async function addE2e(host, options) {
10
9
  const nxJson = (0, devkit_1.readNxJson)(host);
11
10
  const hasPlugin = nxJson.plugins?.some((p) => typeof p === 'string'
12
11
  ? p === '@nx/next/plugin'
13
12
  : p.plugin === '@nx/next/plugin');
14
13
  const e2eWebServerInfo = await getNextE2EWebServerInfo(host, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'next.config.js'), options.addPlugin);
15
- const forceWebpack = options.style === 'less' && (await (0, version_utils_1.isNext16)(host));
16
14
  if (options.e2eTestRunner === 'cypress') {
17
15
  const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/cypress', versions_1.nxVersion);
18
16
  if (!hasPlugin) {
@@ -56,7 +54,7 @@ async function addE2e(host, options) {
56
54
  baseUrl: e2eWebServerInfo.e2eWebServerAddress,
57
55
  jsx: true,
58
56
  webServerCommands: {
59
- default: `${e2eWebServerInfo.e2eWebServerCommand}${forceWebpack ? ' --webpack' : ''}`,
57
+ default: e2eWebServerInfo.e2eWebServerCommand,
60
58
  },
61
59
  ciWebServerCommand: e2eWebServerInfo.e2eCiWebServerCommand,
62
60
  ciBaseUrl: e2eWebServerInfo.e2eCiBaseUrl,
@@ -98,7 +96,7 @@ async function addE2e(host, options) {
98
96
  linter: options.linter,
99
97
  setParserOptionsProject: options.setParserOptionsProject,
100
98
  webServerAddress: e2eWebServerInfo.e2eCiBaseUrl,
101
- webServerCommand: `${e2eWebServerInfo.e2eWebServerCommand}${forceWebpack ? ' --webpack' : ''}`,
99
+ webServerCommand: e2eWebServerInfo.e2eWebServerCommand,
102
100
  addPlugin: options.addPlugin,
103
101
  });
104
102
  return e2eTask;
@@ -113,7 +111,7 @@ async function getNextE2EWebServerInfo(tree, projectName, configFilePath, isPlug
113
111
  nxJson.targetDefaults?.[defaultServeTarget].options?.port) {
114
112
  e2ePort = nxJson.targetDefaults?.[defaultServeTarget].options?.port;
115
113
  }
116
- return (0, e2e_web_server_info_utils_1.getE2EWebServerInfo)(tree, projectName, {
114
+ return (0, internal_1.getE2EWebServerInfo)(tree, projectName, {
117
115
  plugin: '@nx/next/plugin',
118
116
  serveTargetName: 'devTargetName',
119
117
  serveStaticTargetName: 'startTargetName',
@@ -1 +1 @@
1
- {"version":3,"file":"add-project.d.ts","sourceRoot":"","sources":["../../../../../../../packages/next/src/generators/application/lib/add-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAKL,IAAI,EAEL,MAAM,YAAY,CAAC;AAOpB,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QA2F/D"}
1
+ {"version":3,"file":"add-project.d.ts","sourceRoot":"","sources":["../../../../../../../packages/next/src/generators/application/lib/add-project.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAKL,IAAI,EAEL,MAAM,YAAY,CAAC;AAOpB,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QA4F/D"}
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addProject = addProject;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
6
6
  const versions_1 = require("../../../utils/versions");
7
+ const deprecation_1 = require("../../../utils/deprecation");
7
8
  const react_1 = require("@nx/react");
8
9
  function addProject(host, options) {
9
10
  const targets = {};
@@ -14,7 +15,8 @@ function addProject(host, options) {
14
15
  ? p === '@nx/next/plugin'
15
16
  : p.plugin === '@nx/next/plugin');
16
17
  if (!hasPlugin) {
17
- (0, target_defaults_utils_1.addBuildTargetDefaults)(host, '@nx/next:build');
18
+ (0, deprecation_1.warnNextExecutorGenerating)();
19
+ (0, internal_1.addBuildTargetDefaults)(host, '@nx/next:build');
18
20
  targets.build = {
19
21
  executor: '@nx/next:build',
20
22
  outputs: ['{options.outputPath}'],
@@ -1 +1 @@
1
- {"version":3,"file":"create-application-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/next/src/generators/application/lib/create-application-files.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,IAAI,EAEL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAQvD,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,iBA0K1B"}
1
+ {"version":3,"file":"create-application-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/next/src/generators/application/lib/create-application-files.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,IAAI,EAEL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAQvD,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,iBA4I1B"}
@@ -32,7 +32,7 @@ async function createApplicationFiles(host, options) {
32
32
  appContent: (0, create_application_files_helpers_1.createAppJsx)(options.projectName),
33
33
  styleContent: (0, create_application_files_helpers_1.createStyleRules)(),
34
34
  pageStyleContent: `.page {}`,
35
- stylesExt: options.style === 'less' ? options.style : 'css',
35
+ stylesExt: 'css',
36
36
  isUsingTsSolutionSetup: (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host),
37
37
  isNext16: await (0, version_utils_1.isNext16)(host),
38
38
  };
@@ -45,15 +45,7 @@ async function createApplicationFiles(host, options) {
45
45
  if (options.unitTestRunner === 'none') {
46
46
  host.delete((0, devkit_1.joinPathFragments)(options.appProjectRoot, 'specs', `index.spec.${options.js ? 'jsx' : 'tsx'}`));
47
47
  }
48
- if (options.style === 'styled-components') {
49
- (0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files/app-styled-components'), (0, path_1.join)(generatedAppFilePath, 'app'), templateVariables);
50
- }
51
- else if (options.style === 'styled-jsx') {
52
- (0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files/app-styled-jsx'), (0, path_1.join)(generatedAppFilePath, 'app'), templateVariables);
53
- }
54
- else {
55
- (0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files/app-default-layout'), (0, path_1.join)(generatedAppFilePath, 'app'), templateVariables);
56
- }
48
+ (0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files/app-default-layout'), (0, path_1.join)(generatedAppFilePath, 'app'), templateVariables);
57
49
  }
58
50
  else {
59
51
  (0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files/pages'), (0, path_1.join)(generatedAppFilePath, 'pages'), templateVariables);
@@ -98,17 +90,6 @@ async function createApplicationFiles(host, options) {
98
90
  if (options.swc !== false) {
99
91
  host.delete(`${options.appProjectRoot}/.babelrc`);
100
92
  }
101
- if (options.styledModule || options.style === 'tailwind') {
102
- if (options.appDir) {
103
- host.delete(`${generatedAppFilePath}/app/page.module.${options.style}`);
104
- }
105
- else {
106
- host.delete(`${generatedAppFilePath}/pages/${options.fileName}.module.${options.style}`);
107
- }
108
- }
109
- if (options.style !== 'styled-components') {
110
- host.delete(`${generatedAppFilePath}/pages/_document.tsx`);
111
- }
112
93
  if (options.js) {
113
94
  host.delete(`${options.appProjectRoot}/index.d.ts`);
114
95
  (0, devkit_1.toJS)(host);
@@ -10,7 +10,6 @@ export interface NormalizedSchema extends Omit<Schema, 'name' | 'useTsSolution'>
10
10
  e2eProjectRoot: string;
11
11
  parsedTags: string[];
12
12
  fileName: string;
13
- styledModule: null | string;
14
13
  isTsSolutionSetup: boolean;
15
14
  js?: boolean;
16
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/next/src/generators/application/lib/normalize-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,IAAI,EAAE,MAAM,YAAY,CAAC;AAMjE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,CAAC;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,IAAI,GAAG,MAAM,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,EAAE,CAAC,EAAE,OAAO,CAAC;CACd;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAyE3B"}
1
+ {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/next/src/generators/application/lib/normalize-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,IAAI,EAAE,MAAM,YAAY,CAAC;AAMjE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,CAAC;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,EAAE,CAAC,EAAE,OAAO,CAAC;CACd;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAoE3B"}
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const assertion_1 = require("@nx/react/src/utils/assertion");
7
7
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
8
  async function normalizeOptions(host, options) {
9
- await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'application');
10
- const { projectName, names: projectNames, projectRoot: appProjectRoot, importPath, } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
9
+ await (0, internal_1.ensureRootProjectName)(options, 'application');
10
+ const { projectName, names: projectNames, projectRoot: appProjectRoot, importPath, } = await (0, internal_1.determineProjectNameAndRootOptions)(host, {
11
11
  name: options.name,
12
12
  projectType: 'application',
13
13
  directory: options.directory,
@@ -29,9 +29,6 @@ async function normalizeOptions(host, options) {
29
29
  const fileName = 'index';
30
30
  const appDir = options.appDir ?? true;
31
31
  const src = options.src ?? true;
32
- const styledModule = /^(css|scss|less|tailwind)$/.test(options.style)
33
- ? null
34
- : options.style;
35
32
  (0, assertion_1.assertValidStyle)(options.style);
36
33
  return {
37
34
  ...options,
@@ -49,7 +46,6 @@ async function normalizeOptions(host, options) {
49
46
  projectSimpleName: projectNames.projectSimpleName,
50
47
  style: options.style || 'css',
51
48
  swc: options.swc ?? true,
52
- styledModule,
53
49
  unitTestRunner: options.unitTestRunner || 'jest',
54
50
  importPath,
55
51
  isTsSolutionSetup,