@nx/vite 22.6.0-beta.0 → 22.6.0-beta.10

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/vite",
3
- "version": "22.6.0-beta.0",
3
+ "version": "22.6.0-beta.10",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for building and testing applications using Vite",
6
6
  "repository": {
@@ -30,11 +30,11 @@
30
30
  "migrations": "./migrations.json"
31
31
  },
32
32
  "dependencies": {
33
- "@nx/devkit": "22.6.0-beta.0",
33
+ "@nx/devkit": "22.6.0-beta.10",
34
34
  "@phenomnomnominal/tsquery": "~6.1.4",
35
35
  "enquirer": "~2.3.6",
36
- "@nx/js": "22.6.0-beta.0",
37
- "@nx/vitest": "22.6.0-beta.0",
36
+ "@nx/js": "22.6.0-beta.10",
37
+ "@nx/vitest": "22.6.0-beta.10",
38
38
  "picomatch": "4.0.2",
39
39
  "tsconfig-paths": "^4.1.2",
40
40
  "semver": "^7.6.3",
@@ -42,7 +42,7 @@
42
42
  "ajv": "^8.0.0"
43
43
  },
44
44
  "devDependencies": {
45
- "nx": "22.6.0-beta.0"
45
+ "nx": "22.6.0-beta.10"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
@@ -1 +1 @@
1
- {"version":3,"file":"nx-tsconfig-paths.plugin.d.ts","sourceRoot":"","sources":["../../../../packages/vite/plugins/nx-tsconfig-paths.plugin.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAK9B,MAAM,WAAW,oBAAoB;IACnC;;;;QAII;IACJ,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;QAKI;IACJ,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC;IACnC;;;QAGI;IACJ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAsKzD,MAAM,CA0EZ"}
1
+ {"version":3,"file":"nx-tsconfig-paths.plugin.d.ts","sourceRoot":"","sources":["../../../../packages/vite/plugins/nx-tsconfig-paths.plugin.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAK9B,MAAM,WAAW,oBAAoB;IACnC;;;;QAII;IACJ,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;QAKI;IACJ,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC;IACnC;;;QAGI;IACJ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GA4KzD,MAAM,CA0EZ"}
@@ -97,6 +97,12 @@ function nxViteTsPaths(options = {}) {
97
97
  // Let other resolvers handle this path.
98
98
  if (!foundTsConfigPath)
99
99
  return null;
100
+ // Skip absolute and root-relative paths — these are filesystem paths,
101
+ // not TypeScript import specifiers. In Vite, `/foo` is a project-root-
102
+ // relative URL and must be resolved by Vite's built-in resolver, not
103
+ // by tsconfig path mapping (which would incorrectly use baseUrl).
104
+ if (importPath.startsWith('/'))
105
+ return null;
100
106
  let resolvedFile;
101
107
  try {
102
108
  resolvedFile = matchTsPathEsm(importPath);
@@ -1 +1 @@
1
- {"version":3,"file":"preview-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/vite/src/executors/preview-server/preview-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAKhB,MAAM,YAAY,CAAC;AAOpB,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAK5D,wBAAuB,yBAAyB,CAC9C,OAAO,EAAE,gCAAgC,EACzC,OAAO,EAAE,eAAe;;;kBAqKzB;AAoBD,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"preview-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/vite/src/executors/preview-server/preview-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAKhB,MAAM,YAAY,CAAC;AAOpB,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAK5D,wBAAuB,yBAAyB,CAC9C,OAAO,EAAE,gCAAgC,EACzC,OAAO,EAAE,eAAe;;;kBAsKzB;AAoBD,eAAe,yBAAyB,CAAC"}
@@ -34,7 +34,7 @@ async function* vitePreviewServerExecutor(options, context) {
34
34
  const resolved = await resolveConfig({
35
35
  configFile: viteConfigPath,
36
36
  mode: defaultMode,
37
- }, 'build', defaultMode, process.env.NODE_ENV ?? defaultMode);
37
+ }, 'build', defaultMode, process.env.NODE_ENV ?? defaultMode, true);
38
38
  const outDir = options.staticFilePath ??
39
39
  (0, devkit_1.joinPathFragments)((0, devkit_1.offsetFromRoot)(projectRoot), buildTargetOptions.outputPath) ??
40
40
  resolved?.build?.outDir;