@nx/next 0.0.0-pr-29314-e664f92 → 0.0.0-pr-29314-bfd9d0c

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": "0.0.0-pr-29314-e664f92",
3
+ "version": "0.0.0-pr-29314-bfd9d0c",
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": {
@@ -35,7 +35,7 @@
35
35
  "next": ">=14.0.0"
36
36
  },
37
37
  "dependencies": {
38
- "@nx/devkit": "0.0.0-pr-29314-e664f92",
38
+ "@nx/devkit": "0.0.0-pr-29314-bfd9d0c",
39
39
  "@babel/plugin-proposal-decorators": "^7.22.7",
40
40
  "@svgr/webpack": "^8.0.1",
41
41
  "copy-webpack-plugin": "^10.2.4",
@@ -44,11 +44,11 @@
44
44
  "semver": "^7.5.3",
45
45
  "tslib": "^2.3.0",
46
46
  "webpack-merge": "^5.8.0",
47
- "@nx/js": "0.0.0-pr-29314-e664f92",
48
- "@nx/eslint": "0.0.0-pr-29314-e664f92",
49
- "@nx/react": "0.0.0-pr-29314-e664f92",
50
- "@nx/web": "0.0.0-pr-29314-e664f92",
51
- "@nx/webpack": "0.0.0-pr-29314-e664f92",
47
+ "@nx/js": "0.0.0-pr-29314-bfd9d0c",
48
+ "@nx/eslint": "0.0.0-pr-29314-bfd9d0c",
49
+ "@nx/react": "0.0.0-pr-29314-bfd9d0c",
50
+ "@nx/web": "0.0.0-pr-29314-bfd9d0c",
51
+ "@nx/webpack": "0.0.0-pr-29314-bfd9d0c",
52
52
  "@phenomnomnominal/tsquery": "~5.0.1"
53
53
  },
54
54
  "publishConfig": {
@@ -90,6 +90,11 @@ async function applicationGeneratorInternal(host, schema) {
90
90
  }, options.linter === 'eslint'
91
91
  ? ['.next', 'eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
92
92
  : ['.next'], options.src ? 'src' : '.');
93
+ // If we are using the new TS solution
94
+ // We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
95
+ if (options.useTsSolution) {
96
+ (0, ts_solution_setup_1.addProjectToTsSolutionWorkspace)(host, options.appProjectRoot);
97
+ }
93
98
  if (!options.skipFormat) {
94
99
  await (0, devkit_1.formatFiles)(host);
95
100
  }
@@ -5,6 +5,7 @@
5
5
  <% if (style === '@emotion/styled') { %>"jsxImportSource": "@emotion/react",<% } %>
6
6
  "strict": true,
7
7
  "noEmit": true,
8
+ "emitDeclarationOnly": false,
8
9
  "esModuleInterop": true,
9
10
  "module": "esnext",
10
11
  "moduleResolution": "bundler",
@@ -41,6 +41,10 @@
41
41
  "value": "less",
42
42
  "label": "LESS [ https://lesscss.org ]"
43
43
  },
44
+ {
45
+ "value": "tailwind",
46
+ "label": "tailwind [ https://tailwindcss.com/ ]"
47
+ },
44
48
  {
45
49
  "value": "styled-components",
46
50
  "label": "styled-components [ https://styled-components.com ]"
@@ -3,5 +3,6 @@ import { Schema } from '../schema';
3
3
  export interface NormalizedSchema extends Schema {
4
4
  importPath: string;
5
5
  projectRoot: string;
6
+ isUsingTsSolutionConfig: boolean;
6
7
  }
7
8
  export declare function normalizeOptions(host: Tree, options: Schema): Promise<NormalizedSchema>;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
6
+ const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
6
7
  async function normalizeOptions(host, options) {
7
8
  await (0, project_name_and_root_utils_1.ensureProjectName)(host, options, 'library');
8
9
  const { projectRoot, importPath } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
@@ -19,5 +20,6 @@ async function normalizeOptions(host, options) {
19
20
  ...options,
20
21
  importPath,
21
22
  projectRoot,
23
+ isUsingTsSolutionConfig: (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host),
22
24
  };
23
25
  }
@@ -60,7 +60,10 @@ async function libraryGeneratorInternal(host, rawOptions) {
60
60
  return <h1>Hello Server</h1>
61
61
  }
62
62
  `);
63
- (0, js_1.addTsConfigPath)(host, `${options.importPath}/server`, [serverEntryPath]);
63
+ const isTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host);
64
+ if (!options.skipTsConfig && !isTsSolutionSetup) {
65
+ (0, js_1.addTsConfigPath)(host, `${options.importPath}/server`, [serverEntryPath]);
66
+ }
64
67
  (0, devkit_1.updateJson)(host, (0, devkit_1.joinPathFragments)(options.projectRoot, 'tsconfig.json'), (json) => {
65
68
  if (options.style === '@emotion/styled') {
66
69
  json.compilerOptions.jsxImportSource = '@emotion/react';
@@ -90,6 +93,9 @@ async function libraryGeneratorInternal(host, rawOptions) {
90
93
  }, options.linter === 'eslint'
91
94
  ? ['eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
92
95
  : undefined);
96
+ if (options.isUsingTsSolutionConfig) {
97
+ (0, ts_solution_setup_1.addProjectToTsSolutionWorkspace)(host, options.projectRoot);
98
+ }
93
99
  if (!options.skipFormat) {
94
100
  await (0, devkit_1.formatFiles)(host);
95
101
  }
@@ -43,6 +43,10 @@
43
43
  "value": "less",
44
44
  "label": "LESS [ https://lesscss.org ]"
45
45
  },
46
+ {
47
+ "value": "tailwind",
48
+ "label": "tailwind [ https://tailwindcss.com/ ]"
49
+ },
46
50
  {
47
51
  "value": "styled-components",
48
52
  "label": "styled-components [ https://styled-components.com ]"