@nx/vite 23.0.0-beta.0 → 23.0.0-pr.35413.460eeef
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": "23.0.0-
|
|
3
|
+
"version": "23.0.0-pr.35413.460eeef",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for building and testing applications using Vite",
|
|
6
6
|
"repository": {
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"migrations": "./migrations.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@nx/devkit": "23.0.0-
|
|
34
|
+
"@nx/devkit": "23.0.0-pr.35413.460eeef",
|
|
35
35
|
"@phenomnomnominal/tsquery": "~6.1.4",
|
|
36
36
|
"enquirer": "~2.3.6",
|
|
37
|
-
"@nx/js": "23.0.0-
|
|
38
|
-
"@nx/vitest": "23.0.0-
|
|
37
|
+
"@nx/js": "23.0.0-pr.35413.460eeef",
|
|
38
|
+
"@nx/vitest": "23.0.0-pr.35413.460eeef",
|
|
39
39
|
"picomatch": "4.0.4",
|
|
40
40
|
"tsconfig-paths": "^4.1.2",
|
|
41
41
|
"semver": "^7.6.3",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"ajv": "^8.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"nx": "23.0.0-
|
|
46
|
+
"nx": "23.0.0-pr.35413.460eeef"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0",
|
package/src/plugins/plugin.d.ts
CHANGED
|
@@ -10,13 +10,6 @@ export interface VitePluginOptions {
|
|
|
10
10
|
previewTargetName?: string;
|
|
11
11
|
serveStaticTargetName?: string;
|
|
12
12
|
typecheckTargetName?: string;
|
|
13
|
-
/**
|
|
14
|
-
* The compiler to use for type-checking. When unset, defaults to `vue-tsc`
|
|
15
|
-
* for Vue projects (detected via the `vite:vue` plugin) and `tsc` otherwise.
|
|
16
|
-
* Set to `tsgo` to use the TypeScript Go compiler (`@typescript/native-preview`),
|
|
17
|
-
* or `vue-tsc` to force Vue-aware type-checking when auto-detection misses your setup.
|
|
18
|
-
*/
|
|
19
|
-
compiler?: 'tsc' | 'tsgo' | 'vue-tsc';
|
|
20
13
|
watchDepsTargetName?: string;
|
|
21
14
|
buildDepsTargetName?: string;
|
|
22
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/vite/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAGlB,aAAa,EASd,MAAM,YAAY,CAAC;AAmBpB,MAAM,WAAW,iBAAiB;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/vite/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAGlB,aAAa,EASd,MAAM,YAAY,CAAC;AAmBpB,MAAM,WAAW,iBAAiB;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAiBD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAEhC,CAAC;AAIF,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,iBAAiB,CAgHxD,CAAC;AAEF,eAAO,MAAM,aAAa,kCAAc,CAAC"}
|
package/src/plugins/plugin.js
CHANGED
|
@@ -285,22 +285,18 @@ async function buildViteTargets(configFilePath, projectRoot, options, tsConfigFi
|
|
|
285
285
|
const tsConfigToUse = ['tsconfig.app.json', 'tsconfig.lib.json', 'tsconfig.json'].find((t) => tsConfigFiles.includes(t)) ?? tsConfigFiles[0];
|
|
286
286
|
// Check if the project uses Vue plugin
|
|
287
287
|
const hasVuePlugin = viteBuildConfig.plugins?.some((p) => p.name === 'vite:vue');
|
|
288
|
-
|
|
289
|
-
// when their setup isn't detected (e.g. custom/non-standard Vue plugin).
|
|
290
|
-
const resolvedCompiler = options.compiler ?? (hasVuePlugin ? 'vue-tsc' : 'tsc');
|
|
291
|
-
const typeCheckCommand = resolvedCompiler;
|
|
292
|
-
const typeCheckExternalDeps = resolvedCompiler === 'tsgo'
|
|
293
|
-
? ['@typescript/native-preview']
|
|
294
|
-
: resolvedCompiler === 'vue-tsc'
|
|
295
|
-
? ['vue-tsc', 'typescript']
|
|
296
|
-
: ['typescript'];
|
|
288
|
+
const typeCheckCommand = hasVuePlugin ? 'vue-tsc' : 'tsc';
|
|
297
289
|
targets[options.typecheckTargetName] = {
|
|
298
290
|
cache: true,
|
|
299
291
|
inputs: [
|
|
300
292
|
...('production' in namedInputs
|
|
301
293
|
? ['production', '^production']
|
|
302
294
|
: ['default', '^default']),
|
|
303
|
-
{
|
|
295
|
+
{
|
|
296
|
+
externalDependencies: hasVuePlugin
|
|
297
|
+
? ['vue-tsc', 'typescript']
|
|
298
|
+
: ['typescript'],
|
|
299
|
+
},
|
|
304
300
|
],
|
|
305
301
|
command: isUsingTsSolutionSetup
|
|
306
302
|
? `${typeCheckCommand} --build --emitDeclarationOnly`
|