@nx/vite 17.2.0-beta.2 → 17.2.0-beta.4

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/migrations.json CHANGED
@@ -44,21 +44,36 @@
44
44
  },
45
45
  "packageJsonUpdates": {
46
46
  "17.2.0": {
47
- "vitest": {
48
- "version": "~0.34.6",
49
- "alwaysAddToPackageJson": false
50
- },
51
- "@vitest/coverage-v8": {
52
- "version": "~0.34.6",
53
- "alwaysAddToPackageJson": false
54
- },
55
- "@vitest/ui": {
56
- "version": "~0.34.6",
57
- "alwaysAddToPackageJson": false
58
- },
59
- "@vitest/coverage-istanbul": {
60
- "version": "~0.34.6",
61
- "alwaysAddToPackageJson": false
47
+ "version": "17.2.0-beta.2",
48
+ "packages": {
49
+ "vite": {
50
+ "version": "^5.0.0",
51
+ "alwaysAddToPackageJson": false
52
+ },
53
+ "@vitejs/plugin-react": {
54
+ "version": "^4.2.0",
55
+ "alwaysAddToPackageJson": false
56
+ },
57
+ "@vitejs/plugin-react-swc": {
58
+ "version": "^3.5.0",
59
+ "alwaysAddToPackageJson": false
60
+ },
61
+ "vitest": {
62
+ "version": "~0.34.6",
63
+ "alwaysAddToPackageJson": false
64
+ },
65
+ "@vitest/coverage-v8": {
66
+ "version": "~0.34.6",
67
+ "alwaysAddToPackageJson": false
68
+ },
69
+ "@vitest/ui": {
70
+ "version": "~0.34.6",
71
+ "alwaysAddToPackageJson": false
72
+ },
73
+ "@vitest/coverage-istanbul": {
74
+ "version": "~0.34.6",
75
+ "alwaysAddToPackageJson": false
76
+ }
62
77
  }
63
78
  },
64
79
  "16.4.0-beta.7": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/vite",
3
- "version": "17.2.0-beta.2",
3
+ "version": "17.2.0-beta.4",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for building and testing applications using Vite",
6
6
  "repository": {
@@ -32,14 +32,14 @@
32
32
  "@phenomnomnominal/tsquery": "~5.0.1",
33
33
  "@swc/helpers": "~0.5.0",
34
34
  "enquirer": "~2.3.6",
35
- "@nx/devkit": "17.2.0-beta.2",
36
- "@nx/js": "17.2.0-beta.2",
35
+ "@nx/devkit": "17.2.0-beta.4",
36
+ "@nx/js": "17.2.0-beta.4",
37
37
  "tsconfig-paths": "^4.1.2",
38
- "@nrwl/vite": "17.2.0-beta.2"
38
+ "@nrwl/vite": "17.2.0-beta.4"
39
39
  },
40
40
  "peerDependencies": {
41
- "vite": "^4.3.4",
42
- "vitest": ">=0.31.0 <1.0.0"
41
+ "vite": "^5.0.0",
42
+ "vitest": ">=0.34.6 <1.0.0"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public"
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../packages/vite/plugins/nx-tsconfig-paths.plugin.ts"],"sourcesContent":["import { stripIndents, workspaceRoot } from '@nx/devkit';\nimport { existsSync } from 'node:fs';\nimport { relative, join, resolve } from 'node:path';\nimport {\n loadConfig,\n createMatchPath,\n MatchPath,\n ConfigLoaderSuccessResult,\n} from 'tsconfig-paths';\n\nexport interface nxViteTsPathsOptions {\n /**\n * Enable debug logging\n * @default false\n **/\n debug?: boolean;\n /**\n * export fields in package.json to use for resolving\n * @default [['exports', '.', 'import'], 'module', 'main']\n *\n * fallback resolution will use ['main', 'module']\n **/\n mainFields?: (string | string[])[];\n /**\n * extensions to check when resolving files when package.json resolution fails\n * @default ['.ts', '.tsx', '.js', '.jsx', '.json', '.mjs', '.cjs']\n **/\n extensions?: string[];\n}\n\nexport function nxViteTsPaths(options: nxViteTsPathsOptions = {}) {\n let matchTsPathEsm: MatchPath;\n let matchTsPathFallback: MatchPath | undefined;\n let tsConfigPathsEsm: ConfigLoaderSuccessResult;\n let tsConfigPathsFallback: ConfigLoaderSuccessResult;\n\n options.extensions ??= [\n '.ts',\n '.tsx',\n '.js',\n '.jsx',\n '.json',\n '.mjs',\n '.cjs',\n ];\n options.mainFields ??= [['exports', '.', 'import'], 'module', 'main'];\n\n return {\n name: 'nx-vite-ts-paths',\n configResolved(config: any) {\n const projectRoot = config.root;\n const projectRootFromWorkspaceRoot = relative(workspaceRoot, projectRoot);\n\n const foundTsConfigPath = getTsConfig(\n join(\n workspaceRoot,\n 'tmp',\n projectRootFromWorkspaceRoot,\n 'tsconfig.generated.json'\n )\n );\n if (!foundTsConfigPath) {\n throw new Error(stripIndents`Unable to find a tsconfig in the workspace! \nThere should at least be a tsconfig.base.json or tsconfig.json in the root of the workspace ${workspaceRoot}`);\n }\n const parsed = loadConfig(foundTsConfigPath);\n\n logIt('first parsed tsconfig: ', parsed);\n if (parsed.resultType === 'failed') {\n throw new Error(`Failed loading tsonfig at ${foundTsConfigPath}`);\n }\n tsConfigPathsEsm = parsed;\n\n matchTsPathEsm = createMatchPath(\n parsed.absoluteBaseUrl,\n parsed.paths,\n options.mainFields\n );\n\n const rootLevelTsConfig = getTsConfig(\n join(workspaceRoot, 'tsconfig.base.json')\n );\n const rootLevelParsed = loadConfig(rootLevelTsConfig);\n logIt('fallback parsed tsconfig: ', rootLevelParsed);\n if (rootLevelParsed.resultType === 'success') {\n tsConfigPathsFallback = rootLevelParsed;\n matchTsPathFallback = createMatchPath(\n rootLevelParsed.absoluteBaseUrl,\n rootLevelParsed.paths,\n ['main', 'module']\n );\n }\n },\n resolveId(importPath: string) {\n let resolvedFile: string;\n try {\n resolvedFile = matchTsPathEsm(importPath);\n } catch (e) {\n logIt('Using fallback path matching.');\n resolvedFile = matchTsPathFallback?.(importPath);\n }\n\n if (!resolvedFile) {\n if (tsConfigPathsEsm || tsConfigPathsFallback) {\n logIt(\n `Unable to resolve ${importPath} with tsconfig paths. Using fallback file matching.`\n );\n resolvedFile =\n loadFileFromPaths(tsConfigPathsEsm, importPath) ||\n loadFileFromPaths(tsConfigPathsFallback, importPath);\n } else {\n logIt(`Unable to resolve ${importPath} with tsconfig paths`);\n }\n }\n\n logIt(`Resolved ${importPath} to ${resolvedFile}`);\n // Returning null defers to other resolveId functions and eventually the default resolution behavior\n // https://rollupjs.org/plugin-development/#resolveid\n return resolvedFile || null;\n },\n };\n\n function getTsConfig(preferredTsConfigPath: string): string {\n return [\n resolve(preferredTsConfigPath),\n resolve(join(workspaceRoot, 'tsconfig.base.json')),\n resolve(join(workspaceRoot, 'tsconfig.json')),\n ].find((tsPath) => {\n if (existsSync(tsPath)) {\n logIt('Found tsconfig at', tsPath);\n return tsPath;\n }\n });\n }\n\n function logIt(...msg: any[]) {\n if (process.env.NX_VERBOSE_LOGGING === 'true' || options?.debug) {\n console.debug('\\n[Nx Vite TsPaths]', ...msg);\n }\n }\n\n function loadFileFromPaths(\n tsconfig: ConfigLoaderSuccessResult,\n importPath: string\n ) {\n logIt(\n `Trying to resolve file from config in ${tsconfig.configFileAbsolutePath}`\n );\n let resolvedFile: string;\n for (const alias in tsconfig.paths) {\n const paths = tsconfig.paths[alias];\n\n const normalizedImport = alias.replace(/\\/\\*$/, '');\n\n if (importPath.startsWith(normalizedImport)) {\n const path = (tsconfig.absoluteBaseUrl, paths[0].replace(/\\/\\*$/, ''));\n resolvedFile = findFile(importPath.replace(normalizedImport, path));\n }\n }\n\n return resolvedFile;\n }\n\n function findFile(path: string): string {\n for (const ext of options.extensions) {\n const r = resolve(path + ext);\n if (existsSync(r)) {\n return r;\n }\n }\n }\n}\n"],"names":["nxViteTsPaths","options","matchTsPathEsm","matchTsPathFallback","tsConfigPathsEsm","tsConfigPathsFallback","extensions","mainFields","name","configResolved","config","projectRoot","root","projectRootFromWorkspaceRoot","relative","workspaceRoot","foundTsConfigPath","getTsConfig","join","Error","stripIndents","parsed","loadConfig","logIt","resultType","createMatchPath","absoluteBaseUrl","paths","rootLevelTsConfig","rootLevelParsed","resolveId","importPath","resolvedFile","e","loadFileFromPaths","preferredTsConfigPath","resolve","find","tsPath","existsSync","msg","process","env","NX_VERBOSE_LOGGING","debug","console","tsconfig","configFileAbsolutePath","alias","normalizedImport","replace","startsWith","path","findFile","ext","r"],"mapp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AASF,SAASnB,KAAK,CAAE;YAClC,MAAMA,QAAQmB,SAASnB,KAAK,CAACqB,MAAM;YAEnC,MAAMC,mBAAmBD,MAAME,OAAO,CAAC,SAAS;YAEhD,IAAInB,WAAWoB,UAAU,CAACF,mBAAmB;gBAC3C,MAAMG,OAAQN,CAAAA,SAASpB,eAAe,EAAEC,KAAK,CAAC,EAAE,CAACuB,OAAO,CAAC,SAAS,GAAE;gBACpElB,eAAeqB,SAAStB,WAAWmB,OAAO,CAACD,kBAAkBG;YAC/D;QACF;QAEA,OAAOpB;IACT;IAEA,SAASqB,SAASD,IAAY;QAC5B,KAAK,MAAME,OAAOrD,QAAQK,UAAU,CAAE;YACpC,MAAMiD,IAAInB,IAAAA,iBAAO,EAACgB,OAAOE;YACzB,IAAIf,IAAAA,kBAAU,EAACgB,IAAI;gBACjB,OAAOA;YACT;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["../../../../packages/vite/plugins/nx-tsconfig-paths.plugin.ts"],"sourcesContent":["import { stripIndents, workspaceRoot } from '@nx/devkit';\nimport { existsSync } from 'node:fs';\nimport { join, relative, resolve } from 'node:path';\nimport {\n ConfigLoaderSuccessResult,\n createMatchPath,\n loadConfig,\n MatchPath,\n} from 'tsconfig-paths';\n\nexport interface nxViteTsPathsOptions {\n /**\n * Enable debug logging\n * @default false\n **/\n debug?: boolean;\n /**\n * export fields in package.json to use for resolving\n * @default [['exports', '.', 'import'], 'module', 'main']\n *\n * fallback resolution will use ['main', 'module']\n **/\n mainFields?: (string | string[])[];\n /**\n * extensions to check when resolving files when package.json resolution fails\n * @default ['.ts', '.tsx', '.js', '.jsx', '.json', '.mjs', '.cjs']\n **/\n extensions?: string[];\n}\n\nexport function nxViteTsPaths(options: nxViteTsPathsOptions = {}) {\n let matchTsPathEsm: MatchPath;\n let matchTsPathFallback: MatchPath | undefined;\n let tsConfigPathsEsm: ConfigLoaderSuccessResult;\n let tsConfigPathsFallback: ConfigLoaderSuccessResult;\n\n options.extensions ??= [\n '.ts',\n '.tsx',\n '.js',\n '.jsx',\n '.json',\n '.mjs',\n '.cjs',\n ];\n options.mainFields ??= [['exports', '.', 'import'], 'module', 'main'];\n\n return {\n name: 'nx-vite-ts-paths',\n configResolved(config: any) {\n const projectRoot = config.root;\n const projectRootFromWorkspaceRoot = relative(workspaceRoot, projectRoot);\n\n const foundTsConfigPath = getTsConfig(\n join(\n workspaceRoot,\n 'tmp',\n projectRootFromWorkspaceRoot,\n 'tsconfig.generated.json'\n )\n );\n if (!foundTsConfigPath) {\n throw new Error(stripIndents`Unable to find a tsconfig in the workspace! \nThere should at least be a tsconfig.base.json or tsconfig.json in the root of the workspace ${workspaceRoot}`);\n }\n const parsed = loadConfig(foundTsConfigPath);\n\n logIt('first parsed tsconfig: ', parsed);\n if (parsed.resultType === 'failed') {\n throw new Error(`Failed loading tsonfig at ${foundTsConfigPath}`);\n }\n tsConfigPathsEsm = parsed;\n\n matchTsPathEsm = createMatchPath(\n parsed.absoluteBaseUrl,\n parsed.paths,\n options.mainFields\n );\n\n const rootLevelTsConfig = getTsConfig(\n join(workspaceRoot, 'tsconfig.base.json')\n );\n const rootLevelParsed = loadConfig(rootLevelTsConfig);\n logIt('fallback parsed tsconfig: ', rootLevelParsed);\n if (rootLevelParsed.resultType === 'success') {\n tsConfigPathsFallback = rootLevelParsed;\n matchTsPathFallback = createMatchPath(\n rootLevelParsed.absoluteBaseUrl,\n rootLevelParsed.paths,\n ['main', 'module']\n );\n }\n },\n resolveId(importPath: string) {\n let resolvedFile: string;\n try {\n resolvedFile = matchTsPathEsm(importPath);\n } catch (e) {\n logIt('Using fallback path matching.');\n resolvedFile = matchTsPathFallback?.(importPath);\n }\n\n if (!resolvedFile) {\n if (tsConfigPathsEsm || tsConfigPathsFallback) {\n logIt(\n `Unable to resolve ${importPath} with tsconfig paths. Using fallback file matching.`\n );\n resolvedFile =\n loadFileFromPaths(tsConfigPathsEsm, importPath) ||\n loadFileFromPaths(tsConfigPathsFallback, importPath);\n } else {\n logIt(`Unable to resolve ${importPath} with tsconfig paths`);\n }\n }\n\n logIt(`Resolved ${importPath} to ${resolvedFile}`);\n // Returning null defers to other resolveId functions and eventually the default resolution behavior\n // https://rollupjs.org/plugin-development/#resolveid\n return resolvedFile || null;\n },\n };\n\n function getTsConfig(preferredTsConfigPath: string): string {\n return [\n resolve(preferredTsConfigPath),\n resolve(join(workspaceRoot, 'tsconfig.base.json')),\n resolve(join(workspaceRoot, 'tsconfig.json')),\n ].find((tsPath) => {\n if (existsSync(tsPath)) {\n logIt('Found tsconfig at', tsPath);\n return tsPath;\n }\n });\n }\n\n function logIt(...msg: any[]) {\n if (process.env.NX_VERBOSE_LOGGING === 'true' || options?.debug) {\n console.debug('\\n[Nx Vite TsPaths]', ...msg);\n }\n }\n\n function loadFileFromPaths(\n tsconfig: ConfigLoaderSuccessResult,\n importPath: string\n ) {\n logIt(\n `Trying to resolve file from config in ${tsconfig.configFileAbsolutePath}`\n );\n let resolvedFile: string;\n for (const alias in tsconfig.paths) {\n const paths = tsconfig.paths[alias];\n\n const normalizedImport = alias.replace(/\\/\\*$/, '');\n\n if (importPath.startsWith(normalizedImport)) {\n const path = (tsconfig.absoluteBaseUrl, paths[0].replace(/\\/\\*$/, ''));\n resolvedFile = findFile(importPath.replace(normalizedImport, path));\n }\n }\n\n return resolvedFile;\n }\n\n function findFile(path: string): string {\n for (const ext of options.extensions) {\n const r = resolve(path + ext);\n if (existsSync(r)) {\n return r;\n }\n }\n }\n}\n"],"names":["nxViteTsPaths","options","matchTsPathEsm","matchTsPathFallback","tsConfigPathsEsm","tsConfigPathsFallback","extensions","mainFields","name","configResolved","config","projectRoot","root","projectRootFromWorkspaceRoot","relative","workspaceRoot","foundTsConfigPath","getTsConfig","join","Error","stripIndents","parsed","loadConfig","logIt","resultType","createMatchPath","absoluteBaseUrl","paths","rootLevelTsConfig","rootLevelParsed","resolveId","importPath","resolvedFile","e","loadFileFromPaths","preferredTsConfigPath","resolve","find","tsPath","existsSync","msg","process","env","NX_VERBOSE_LOGGING","debug","console","tsconfig","configFileAbsolutePath","alias","normalizedImport","replace","startsWith","path","findFile","ext","r"],"mappings":";+BA8BgBA;;;eAAAA;;;wBA9B4B;wBACjB;0BACa;+BAMjC;AAsBA,SAASA,cAAcC,UAAgC,CAAC,CAAC;QAM9DA,UASAA;IAdA,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;;IAEJJ,gBAAAA,WAAAA,SAAQK,oCAARL,SAAQK,aAAe;QACrB;QACA;QACA;QACA;QACA;QACA;QACA;KACD;;IACDL,gBAAAA,YAAAA,SAAQM,oCAARN,UAAQM,aAAe;QAAC;YAAC;YAAW;YAAK;SAAS;QAAE;QAAU;KAAO;IAErE,OAAO;QACLC,MAAM;QACNC,gBAAeC,MAAW;YACxB,MAAMC,cAAcD,OAAOE,IAAI;YAC/B,MAAMC,+BAA+BC,IAAAA,kBAAQ,EAACC,qBAAa,EAAEJ;YAE7D,MAAMK,oBAAoBC,YACxBC,IAAAA,cAAI,EACFH,qBAAa,EACb,OACAF,8BACA;YAGJ,IAAI,CAACG,mBAAmB;gBACtB,MAAM,IAAIG,MAAMC,IAAAA,oBAAY,CAAA,CAAC;4FACuD,EAAEL,qBAAa,CAAC,CAAC;YACvG;YACA,MAAMM,SAASC,IAAAA,yBAAU,EAACN;YAE1BO,MAAM,2BAA2BF;YACjC,IAAIA,OAAOG,UAAU,KAAK,UAAU;gBAClC,MAAM,IAAIL,MAAM,CAAC,0BAA0B,EAAEH,kBAAkB,CAAC;YAClE;YACAZ,mBAAmBiB;YAEnBnB,iBAAiBuB,IAAAA,8BAAe,EAC9BJ,OAAOK,eAAe,EACtBL,OAAOM,KAAK,EACZ1B,QAAQM,UAAU;YAGpB,MAAMqB,oBAAoBX,YACxBC,IAAAA,cAAI,EAACH,qBAAa,EAAE;YAEtB,MAAMc,kBAAkBP,IAAAA,yBAAU,EAACM;YACnCL,MAAM,8BAA8BM;YACpC,IAAIA,gBAAgBL,UAAU,KAAK,WA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AC,sCAAsC,EAAEuB,SAASC,sBAAsB,CAAC,CAAC;QAE5E,IAAIf;QACJ,IAAK,MAAMgB,SAASF,SAASnB,KAAK,CAAE;YAClC,MAAMA,QAAQmB,SAASnB,KAAK,CAACqB,MAAM;YAEnC,MAAMC,mBAAmBD,MAAME,OAAO,CAAC,SAAS;YAEhD,IAAInB,WAAWoB,UAAU,CAACF,mBAAmB;gBAC3C,MAAMG,OAAQN,CAAAA,SAASpB,eAAe,EAAEC,KAAK,CAAC,EAAE,CAACuB,OAAO,CAAC,SAAS,GAAE;gBACpElB,eAAeqB,SAAStB,WAAWmB,OAAO,CAACD,kBAAkBG;YAC/D;QACF;QAEA,OAAOpB;IACT;IAEA,SAASqB,SAASD,IAAY;QAC5B,KAAK,MAAME,OAAOrD,QAAQK,UAAU,CAAE;YACpC,MAAMiD,IAAInB,IAAAA,iBAAO,EAACgB,OAAOE;YACzB,IAAIf,IAAAA,kBAAU,EAACgB,IAAI;gBACjB,OAAOA;YACT;QACF;IACF;AACF"}
@@ -101,8 +101,13 @@ function closeServer(server) {
101
101
  resolve();
102
102
  } else {
103
103
  const { httpServer } = server;
104
- // closeAllConnections was added in Node v18.2.0
105
- httpServer.closeAllConnections && httpServer.closeAllConnections();
104
+ if (httpServer['closeAllConnections']) {
105
+ // https://github.com/vitejs/vite/pull/14834
106
+ // closeAllConnections was added in Node v18.2.0
107
+ // typically is "as http.Server" but no reason
108
+ // to import http just for this
109
+ httpServer.closeAllConnections();
110
+ }
106
111
  httpServer.close(()=>resolve());
107
112
  }
108
113
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../packages/vite/src/executors/preview-server/preview-server.impl.ts"],"sourcesContent":["import { ExecutorContext, parseTargetString, runExecutor } from '@nx/devkit';\nimport type { InlineConfig, PreviewServer } from 'vite';\nimport {\n getNxTargetOptions,\n getViteBuildOptions,\n getVitePreviewOptions,\n getViteSharedConfig,\n} from '../../utils/options-utils';\nimport { ViteBuildExecutorOptions } from '../build/schema';\nimport { VitePreviewServerExecutorOptions } from './schema';\n\ninterface CustomBuildTargetOptions {\n outputPath: string;\n}\n\nexport async function* vitePreviewServerExecutor(\n options: VitePreviewServerExecutorOptions,\n context: ExecutorContext\n) {\n // Allows ESM to be required in CJS modules. Vite will be published as ESM in the future.\n const { mergeConfig, preview } = await (Function(\n 'return import(\"vite\")'\n )() as Promise<typeof import('vite')>);\n\n const target = parseTargetString(options.buildTarget, context);\n const targetConfiguration =\n context.projectsConfigurations.projects[target.project]?.targets[\n target.target\n ];\n if (!targetConfiguration) {\n throw new Error(`Invalid buildTarget: ${options.buildTarget}`);\n }\n\n const isCustomBuildTarget =\n targetConfiguration.executor !== '@nx/vite:build' &&\n targetConfiguration.executor !== '@nrwl/vite:build';\n\n // Retrieve the option for the configured buildTarget.\n const buildTargetOptions:\n | ViteBuildExecutorOptions\n | CustomBuildTargetOptions = getNxTargetOptions(\n options.buildTarget,\n context\n );\n\n const outputPath = options.staticFilePath ?? buildTargetOptions.outputPath;\n\n if (!outputPath) {\n throw new Error(\n `Could not infer the \"outputPath\". It should either be a property of the \"${options.buildTarget}\" buildTarget or provided explicitly as a \"staticFilePath\" option.`\n );\n }\n\n // Merge the options from the build and preview-serve targets.\n // The latter takes precedence.\n const mergedOptions = {\n ...{ watch: {} },\n ...(isCustomBuildTarget ? {} : buildTargetOptions),\n ...options,\n outputPath,\n };\n\n // Retrieve the server configuration.\n const serverConfig: InlineConfig = mergeConfig(\n getViteSharedConfig(mergedOptions, options.clearScreen, context),\n {\n build: getViteBuildOptions(mergedOptions, context),\n preview: getVitePreviewOptions(mergedOptions, context),\n }\n );\n\n if (serverConfig.mode === 'production') {\n console.warn('WARNING: preview is not meant to be run in production!');\n }\n\n let server: PreviewServer | undefined;\n\n const processOnExit = async () => {\n await closeServer(server);\n };\n\n process.once('SIGINT', processOnExit);\n process.once('SIGTERM', processOnExit);\n process.once('exit', processOnExit);\n\n // Launch the build target.\n // If customBuildTarget is set to true, do not provide any overrides to it\n const buildTargetOverrides = isCustomBuildTarget ? {} : mergedOptions;\n const build = await runExecutor(target, buildTargetOverrides, context);\n\n for await (const result of build) {\n if (result.success) {\n try {\n if (!server) {\n server = await preview(serverConfig);\n }\n server.printUrls();\n\n const resolvedUrls = [\n ...server.resolvedUrls.local,\n ...server.resolvedUrls.network,\n ];\n\n yield {\n success: true,\n baseUrl: resolvedUrls[0] ?? '',\n };\n } catch (e) {\n console.error(e);\n yield {\n success: false,\n baseUrl: '',\n };\n }\n } else {\n yield {\n success: false,\n baseUrl: '',\n };\n }\n }\n\n await new Promise<void>((resolve) => {\n process.once('SIGINT', () => resolve());\n process.once('SIGTERM', () => resolve());\n process.once('exit', () => resolve());\n });\n}\n\nfunction closeServer(server?: PreviewServer): Promise<void> {\n return new Promise((resolve) => {\n if (!server) {\n resolve();\n } else {\n const { httpServer } = server;\n // closeAllConnections was added in Node v18.2.0\n httpServer.closeAllConnections && httpServer.closeAllConnections();\n httpServer.close(() => resolve());\n }\n });\n}\n\nexport default vitePreviewServerExecutor;\n"],"names":["vitePreviewServerExecutor","options","context","mergeConfig","preview","Function","target","parseTargetString","buildTarget","targetConfiguration","projectsConfigurations","projects","project","targets","Error","isCustomBuildTarget","executor","buildTargetOptions","getNxTargetOptions","outputPath","staticFilePath","mergedOptions","watch","serverConfig","getViteSharedConfig","clearScreen","build","getViteBuildOptions","getVitePreviewOptions","mode","console","warn","server","processOnExit","closeServer","process","once","buildTargetOverrides","runExecutor","result","success","printUrls","resolvedUrls","local","network","baseUrl","e","error","Promise","resolve","httpServer","closeAllConnections","close"],"mappings":";;;;;;;;IAeuBA,yBAAyB;eAAzBA;;IA+HvB,OAAyC;eAAzC;;;;wBA9IgE;8BAOzD;AAQA,gBAAgBA,0BACrBC,OAAyC,EACzCC,OAAwB;QAStBA;IAPF,yFAAyF;IACzF,MAAM,EAAEC,WAAW,EAAEC,OAAO,EAAE,GAAG,MAAOC,SACtC;IAGF,MAAMC,SAASC,IAAAA,yBAAiB,EAACN,QAAQO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AAuBtB,sBAAsB,CAAC,IAAIM;IACxD,MAAMK,QAAQ,MAAMY,IAAAA,mBAAW,EAAChC,QAAQ+B,sBAAsBnC;IAE9D,WAAW,MAAMqC,UAAUb,MAAO;QAChC,IAAIa,OAAOC,OAAO,EAAE;YAClB,IAAI;gBACF,IAAI,CAACR,QAAQ;oBACXA,SAAS,MAAM5B,QAAQmB;gBACzB;gBACAS,OAAOS,SAAS;gBAEhB,MAAMC,eAAe;uBAChBV,OAAOU,YAAY,CAACC,KAAK;uBACzBX,OAAOU,YAAY,CAACE,OAAO;iBAC/B;oBAIUF;gBAFX,MAAM;oBACJF,SAAS;oBACTK,SAASH,CAAAA,iBAAAA,YAAY,CAAC,EAAE,YAAfA,iBAAmB;gBAC9B;YACF,EAAE,OAAOI,GAAG;gBACVhB,QAAQiB,KAAK,CAACD;gBACd,MAAM;oBACJN,SAAS;oBACTK,SAAS;gBACX;YACF;QACF,OAAO;YACL,MAAM;gBACJL,SAAS;gBACTK,SAAS;YACX;QACF;IACF;IAEA,MAAM,IAAIG,QAAc,CAACC;QACvBd,QAAQC,IAAI,CAAC,UAAU,IAAMa;QAC7Bd,QAAQC,IAAI,CAAC,WAAW,IAAMa;QAC9Bd,QAAQC,IAAI,CAAC,QAAQ,IAAMa;IAC7B;AACF;AAEA,SAASf,YAAYF,MAAsB;IACzC,OAAO,IAAIgB,QAAQ,CAACC;QAClB,IAAI,CAACjB,QAAQ;YACXiB;QACF,OAAO;YACL,MAAM,EAAEC,UAAU,EAAE,GAAGlB;YACvB,gDAAgD;YAChDkB,WAAWC,mBAAmB,IAAID,WAAWC,mBAAmB;YAChED,WAAWE,KAAK,CAAC,IAAMH;QACzB;IACF;AACF;MAEA,WAAejD"}
1
+ {"version":3,"sources":["../../../../../../packages/vite/src/executors/preview-server/preview-server.impl.ts"],"sourcesContent":["import { ExecutorContext, parseTargetString, runExecutor } from '@nx/devkit';\nimport type { InlineConfig, PreviewServer } from 'vite';\nimport {\n getNxTargetOptions,\n getViteBuildOptions,\n getVitePreviewOptions,\n getViteSharedConfig,\n} from '../../utils/options-utils';\nimport { ViteBuildExecutorOptions } from '../build/schema';\nimport { VitePreviewServerExecutorOptions } from './schema';\n\ninterface CustomBuildTargetOptions {\n outputPath: string;\n}\n\nexport async function* vitePreviewServerExecutor(\n options: VitePreviewServerExecutorOptions,\n context: ExecutorContext\n) {\n // Allows ESM to be required in CJS modules. Vite will be published as ESM in the future.\n const { mergeConfig, preview } = await (Function(\n 'return import(\"vite\")'\n )() as Promise<typeof import('vite')>);\n\n const target = parseTargetString(options.buildTarget, context);\n const targetConfiguration =\n context.projectsConfigurations.projects[target.project]?.targets[\n target.target\n ];\n if (!targetConfiguration) {\n throw new Error(`Invalid buildTarget: ${options.buildTarget}`);\n }\n\n const isCustomBuildTarget =\n targetConfiguration.executor !== '@nx/vite:build' &&\n targetConfiguration.executor !== '@nrwl/vite:build';\n\n // Retrieve the option for the configured buildTarget.\n const buildTargetOptions:\n | ViteBuildExecutorOptions\n | CustomBuildTargetOptions = getNxTargetOptions(\n options.buildTarget,\n context\n );\n\n const outputPath = options.staticFilePath ?? buildTargetOptions.outputPath;\n\n if (!outputPath) {\n throw new Error(\n `Could not infer the \"outputPath\". It should either be a property of the \"${options.buildTarget}\" buildTarget or provided explicitly as a \"staticFilePath\" option.`\n );\n }\n\n // Merge the options from the build and preview-serve targets.\n // The latter takes precedence.\n const mergedOptions = {\n ...{ watch: {} },\n ...(isCustomBuildTarget ? {} : buildTargetOptions),\n ...options,\n outputPath,\n };\n\n // Retrieve the server configuration.\n const serverConfig: InlineConfig = mergeConfig(\n getViteSharedConfig(mergedOptions, options.clearScreen, context),\n {\n build: getViteBuildOptions(mergedOptions, context),\n preview: getVitePreviewOptions(mergedOptions, context),\n }\n );\n\n if (serverConfig.mode === 'production') {\n console.warn('WARNING: preview is not meant to be run in production!');\n }\n\n let server: PreviewServer | undefined;\n\n const processOnExit = async () => {\n await closeServer(server);\n };\n\n process.once('SIGINT', processOnExit);\n process.once('SIGTERM', processOnExit);\n process.once('exit', processOnExit);\n\n // Launch the build target.\n // If customBuildTarget is set to true, do not provide any overrides to it\n const buildTargetOverrides = isCustomBuildTarget ? {} : mergedOptions;\n const build = await runExecutor(target, buildTargetOverrides, context);\n\n for await (const result of build) {\n if (result.success) {\n try {\n if (!server) {\n server = await preview(serverConfig);\n }\n server.printUrls();\n\n const resolvedUrls = [\n ...server.resolvedUrls.local,\n ...server.resolvedUrls.network,\n ];\n\n yield {\n success: true,\n baseUrl: resolvedUrls[0] ?? '',\n };\n } catch (e) {\n console.error(e);\n yield {\n success: false,\n baseUrl: '',\n };\n }\n } else {\n yield {\n success: false,\n baseUrl: '',\n };\n }\n }\n\n await new Promise<void>((resolve) => {\n process.once('SIGINT', () => resolve());\n process.once('SIGTERM', () => resolve());\n process.once('exit', () => resolve());\n });\n}\n\nfunction closeServer(server?: PreviewServer): Promise<void> {\n return new Promise((resolve) => {\n if (!server) {\n resolve();\n } else {\n const { httpServer } = server;\n if (httpServer['closeAllConnections']) {\n // https://github.com/vitejs/vite/pull/14834\n // closeAllConnections was added in Node v18.2.0\n // typically is \"as http.Server\" but no reason\n // to import http just for this\n (httpServer as any).closeAllConnections();\n }\n httpServer.close(() => resolve());\n }\n });\n}\n\nexport default vitePreviewServerExecutor;\n"],"names":["vitePreviewServerExecutor","options","context","mergeConfig","preview","Function","target","parseTargetString","buildTarget","targetConfiguration","projectsConfigurations","projects","project","targets","Error","isCustomBuildTarget","executor","buildTargetOptions","getNxTargetOptions","outputPath","staticFilePath","mergedOptions","watch","serverConfig","getViteSharedConfig","clearScreen","build","getViteBuildOptions","getVitePreviewOptions","mode","console","warn","server","processOnExit","closeServer","process","once","buildTargetOverrides","runExecutor","result","success","printUrls","resolvedUrls","local","network","baseUrl","e","error","Promise","resolve","httpServer","closeAllConnections","close"],"mappings":";;;;;;;;IAeuBA,yBAAyB;eAAzBA;;IAoIvB,OAAyC;eAAzC;;;;wBAnJgE;8BAOzD;AAQA,gBAAgB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BAAmB;YACzC;YACAD,WAAWE,KAAK,CAAC,IAAMH;QACzB;IACF;AACF;MAEA,WAAejD"}
@@ -1,8 +1,8 @@
1
1
  export declare const nxVersion: any;
2
- export declare const viteVersion = "~4.3.9";
2
+ export declare const viteVersion = "^5.0.0";
3
3
  export declare const vitestVersion = "~0.34.6";
4
- export declare const vitePluginReactVersion = "~4.0.0";
5
- export declare const vitePluginReactSwcVersion = "~3.3.2";
4
+ export declare const vitePluginReactVersion = "^4.2.0";
5
+ export declare const vitePluginReactSwcVersion = "^3.5.0";
6
6
  export declare const jsdomVersion = "~22.1.0";
7
7
  export declare const vitePluginDtsVersion = "~2.3.0";
8
8
  export declare const happyDomVersion = "~9.20.3";
@@ -41,10 +41,10 @@ _export(exports, {
41
41
  }
42
42
  });
43
43
  const nxVersion = require('../../package.json').version;
44
- const viteVersion = '~4.3.9';
44
+ const viteVersion = '^5.0.0';
45
45
  const vitestVersion = '~0.34.6';
46
- const vitePluginReactVersion = '~4.0.0';
47
- const vitePluginReactSwcVersion = '~3.3.2';
46
+ const vitePluginReactVersion = '^4.2.0';
47
+ const vitePluginReactSwcVersion = '^3.5.0';
48
48
  const jsdomVersion = '~22.1.0';
49
49
  const vitePluginDtsVersion = '~2.3.0';
50
50
  const happyDomVersion = '~9.20.3';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../packages/vite/src/utils/versions.ts"],"sourcesContent":["export const nxVersion = require('../../package.json').version;\nexport const viteVersion = '~4.3.9';\nexport const vitestVersion = '~0.34.6';\nexport const vitePluginReactVersion = '~4.0.0';\nexport const vitePluginReactSwcVersion = '~3.3.2';\nexport const jsdomVersion = '~22.1.0';\nexport const vitePluginDtsVersion = '~2.3.0';\nexport const happyDomVersion = '~9.20.3';\nexport const edgeRuntimeVmVersion = '~3.0.2';\n\n// Coverage providers\nexport const vitestCoverageV8Version = '~0.34.6';\nexport const vitestCoverageIstanbulVersion = '~0.34.6';\n"],"names":["nxVersion","viteVersion","vitestVersion","vitePluginReactVersion","vitePluginReactSwcVersion","jsdomVersion","vitePluginDtsVersion","happyDomVersion","edgeRuntimeVmVersion","vitestCoverageV8Version","vitestCoverageIstanbulVersion","require","version"],"mappings":";;;;;;;;IAAaA,SAAS;eAATA;;IACAC,WAAW;eAAXA;;IACAC,aAAa;eAAbA;;IACAC,sBAAsB;eAAtBA;;IACAC,yBAAyB;eAAzBA;;IACAC,YAAY;eAAZA;;IACAC,oBAAoB;eAApBA;;IACAC,eAAe;eAAfA;;IACAC,oBAAoB;eAApBA;;IAGAC,uBAAuB;eAAvBA;;IACAC,6BAA6B;eAA7BA;;;AAZN,MAAMV,YAAYW,QAAQ,sBAAsBC,OAAO;AACvD,MAAMX,cAAc;AACpB,MAAMC,gBAAgB;AACtB,MAAMC,yBAAyB;AAC/B,MAAMC,4BAA4B;AAClC,MAAMC,eAAe;AACrB,MAAMC,uBAAuB;AAC7B,MAAMC,kBAAkB;AACxB,MAAMC,uBAAuB;AAG7B,MAAMC,0BAA0B;AAChC,MAAMC,gCAAgC"}
1
+ {"version":3,"sources":["../../../../../packages/vite/src/utils/versions.ts"],"sourcesContent":["export const nxVersion = require('../../package.json').version;\nexport const viteVersion = '^5.0.0';\nexport const vitestVersion = '~0.34.6';\nexport const vitePluginReactVersion = '^4.2.0';\nexport const vitePluginReactSwcVersion = '^3.5.0';\nexport const jsdomVersion = '~22.1.0';\nexport const vitePluginDtsVersion = '~2.3.0';\nexport const happyDomVersion = '~9.20.3';\nexport const edgeRuntimeVmVersion = '~3.0.2';\n\n// Coverage providers\nexport const vitestCoverageV8Version = '~0.34.6';\nexport const vitestCoverageIstanbulVersion = '~0.34.6';\n"],"names":["nxVersion","viteVersion","vitestVersion","vitePluginReactVersion","vitePluginReactSwcVersion","jsdomVersion","vitePluginDtsVersion","happyDomVersion","edgeRuntimeVmVersion","vitestCoverageV8Version","vitestCoverageIstanbulVersion","require","version"],"mappings":";;;;;;;;IAAaA,SAAS;eAATA;;IACAC,WAAW;eAAXA;;IACAC,aAAa;eAAbA;;IACAC,sBAAsB;eAAtBA;;IACAC,yBAAyB;eAAzBA;;IACAC,YAAY;eAAZA;;IACAC,oBAAoB;eAApBA;;IACAC,eAAe;eAAfA;;IACAC,oBAAoB;eAApBA;;IAGAC,uBAAuB;eAAvBA;;IACAC,6BAA6B;eAA7BA;;;AAZN,MAAMV,YAAYW,QAAQ,sBAAsBC,OAAO;AACvD,MAAMX,cAAc;AACpB,MAAMC,gBAAgB;AACtB,MAAMC,yBAAyB;AAC/B,MAAMC,4BAA4B;AAClC,MAAMC,eAAe;AACrB,MAAMC,uBAAuB;AAC7B,MAAMC,kBAAkB;AACxB,MAAMC,uBAAuB;AAG7B,MAAMC,0BAA0B;AAChC,MAAMC,gCAAgC"}