@nx/vite 23.0.1 → 23.0.2

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.
@@ -83,7 +83,7 @@ function nxViteTsPaths(options = {}) {
83
83
  .filter((dep) => dep.node.type === 'lib')
84
84
  .map((dep) => dep.node.name)
85
85
  .join(',');
86
- const buildCommand = `npx nx run-many --target=${depsBuildTarget} --projects=${buildableLibraryDependencies}`;
86
+ const buildCommand = `${(0, devkit_1.getPackageManagerCommand)().exec} nx run-many --target=${depsBuildTarget} --projects=${buildableLibraryDependencies}`;
87
87
  config.plugins.push((0, nx_vite_build_coordination_plugin_1.nxViteBuildCoordinationPlugin)({ buildCommand }));
88
88
  }
89
89
  }
@@ -145,7 +145,7 @@ async function buildViteTargets(configFilePath, projectRoot, options, tsConfigFi
145
145
  if (tsConfigFiles.length) {
146
146
  const tsConfigToUse = ['tsconfig.app.json', 'tsconfig.lib.json', 'tsconfig.json'].find((t) => tsConfigFiles.includes(t)) ?? tsConfigFiles[0];
147
147
  // Check if the project uses Vue plugin
148
- const hasVuePlugin = viteBuildConfig.plugins?.some((p) => p.name === 'vite:vue');
148
+ const hasVuePlugin = viteBuildConfig.plugins?.some((p) => p.name === 'vite:vue' || p.name === 'vite:vue2');
149
149
  // Explicit `compiler` option wins over inference so users can override
150
150
  // when their setup isn't detected (e.g. custom/non-standard Vue plugin).
151
151
  const resolvedCompiler = options.compiler ?? (hasVuePlugin ? 'vue-tsc' : 'tsc');
@@ -5,7 +5,7 @@ export declare function warnViteBuildExecutorDeprecation(): void;
5
5
  export declare function warnViteDevServerExecutorDeprecation(): void;
6
6
  export declare function warnVitePreviewServerExecutorDeprecation(): void;
7
7
  export declare function warnViteExecutorGenerating(): void;
8
- export declare const NX_VITE_TS_PATHS_DEPRECATION_MESSAGE = "The `nxViteTsPaths` plugin from `@nx/vite/plugins/nx-tsconfig-paths.plugin` is deprecated and will be removed in Nx v24. Replace it with `tsconfigPaths()` from the `vite-tsconfig-paths` package. See https://nx.dev/docs/technologies/build-tools/vite/configure-vite for details.";
9
- export declare const NX_COPY_ASSETS_PLUGIN_DEPRECATION_MESSAGE = "The `nxCopyAssetsPlugin` plugin from `@nx/vite/plugins/nx-copy-assets.plugin` is deprecated and will be removed in Nx v24. Use Vite's native `publicDir` option or the `vite-plugin-static-copy` package instead. See https://nx.dev/docs/technologies/build-tools/vite/configure-vite for details.";
8
+ export declare const NX_VITE_TS_PATHS_DEPRECATION_MESSAGE = "The `nxViteTsPaths` plugin from `@nx/vite/plugins/nx-tsconfig-paths.plugin` is deprecated and will be removed in Nx v24. Replace it with `tsconfigPaths()` from the `vite-tsconfig-paths` package. See https://nx.dev/docs/technologies/build-tools/vite/guides/configure-vite for details.";
9
+ export declare const NX_COPY_ASSETS_PLUGIN_DEPRECATION_MESSAGE = "The `nxCopyAssetsPlugin` plugin from `@nx/vite/plugins/nx-copy-assets.plugin` is deprecated and will be removed in Nx v24. Use Vite's native `publicDir` option or the `vite-plugin-static-copy` package instead. See https://nx.dev/docs/technologies/build-tools/vite/guides/configure-vite for details.";
10
10
  export declare function warnNxViteTsPathsDeprecation(): void;
11
11
  export declare function warnNxCopyAssetsPluginDeprecation(): void;
@@ -36,8 +36,8 @@ function warnViteExecutorGenerating() {
36
36
  // tsconfig, so the community `vite-tsconfig-paths` package handles path
37
37
  // resolution end-to-end. Asset copying is covered by Vite's native
38
38
  // `publicDir` option or the `vite-plugin-static-copy` package.
39
- exports.NX_VITE_TS_PATHS_DEPRECATION_MESSAGE = 'The `nxViteTsPaths` plugin from `@nx/vite/plugins/nx-tsconfig-paths.plugin` is deprecated and will be removed in Nx v24. Replace it with `tsconfigPaths()` from the `vite-tsconfig-paths` package. See https://nx.dev/docs/technologies/build-tools/vite/configure-vite for details.';
40
- exports.NX_COPY_ASSETS_PLUGIN_DEPRECATION_MESSAGE = "The `nxCopyAssetsPlugin` plugin from `@nx/vite/plugins/nx-copy-assets.plugin` is deprecated and will be removed in Nx v24. Use Vite's native `publicDir` option or the `vite-plugin-static-copy` package instead. See https://nx.dev/docs/technologies/build-tools/vite/configure-vite for details.";
39
+ exports.NX_VITE_TS_PATHS_DEPRECATION_MESSAGE = 'The `nxViteTsPaths` plugin from `@nx/vite/plugins/nx-tsconfig-paths.plugin` is deprecated and will be removed in Nx v24. Replace it with `tsconfigPaths()` from the `vite-tsconfig-paths` package. See https://nx.dev/docs/technologies/build-tools/vite/guides/configure-vite for details.';
40
+ exports.NX_COPY_ASSETS_PLUGIN_DEPRECATION_MESSAGE = "The `nxCopyAssetsPlugin` plugin from `@nx/vite/plugins/nx-copy-assets.plugin` is deprecated and will be removed in Nx v24. Use Vite's native `publicDir` option or the `vite-plugin-static-copy` package instead. See https://nx.dev/docs/technologies/build-tools/vite/guides/configure-vite for details.";
41
41
  let nxViteTsPathsWarned = false;
42
42
  let nxCopyAssetsPluginWarned = false;
43
43
  // Warn-once per process so users don't see the message repeated on every
@@ -17,6 +17,10 @@ async function validateTypes(opts) {
17
17
  ? opts.tsconfig
18
18
  : (0, path_1.join)(opts.workspaceRoot, opts.tsconfig),
19
19
  mode: 'noEmit',
20
+ // TS 6 defaults rootDir to the tsconfig dir, so from-source workspace
21
+ // libs (outside the project) trip TS6059. rootDir is emit-only and this
22
+ // is noEmit, so widen it to the workspace root to clear the false error.
23
+ rootDir: opts.workspaceRoot,
20
24
  });
21
25
  await (0, js_1.printDiagnostics)(result.errors, result.warnings);
22
26
  if (result.errors.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/vite",
3
- "version": "23.0.1",
3
+ "version": "23.0.2",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "files": [
@@ -101,13 +101,13 @@
101
101
  "semver": "^7.6.3",
102
102
  "tslib": "^2.3.0",
103
103
  "ajv": "^8.0.0",
104
- "@nx/devkit": "23.0.1",
105
- "@nx/js": "23.0.1",
106
- "@nx/vitest": "23.0.1"
104
+ "@nx/devkit": "23.0.2",
105
+ "@nx/js": "23.0.2",
106
+ "@nx/vitest": "23.0.2"
107
107
  },
108
108
  "devDependencies": {
109
- "@nx/eslint": "23.0.1",
110
- "nx": "23.0.1"
109
+ "@nx/eslint": "23.0.2",
110
+ "nx": "23.0.2"
111
111
  },
112
112
  "peerDependencies": {
113
113
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"