nativescript 9.1.0-alpha.1 → 9.1.0-alpha.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.
@@ -36,6 +36,9 @@ class BundlerCompilerService extends events_1.EventEmitter {
36
36
  this.bundlerProcesses = {};
37
37
  this.expectedHashes = {};
38
38
  }
39
+ getViteDistOutputPath(projectDir) {
40
+ return path.join(projectDir, process.env.NS_VITE_DIST_DIR || constants_1.VITE_DIST_FOLDER_NAME);
41
+ }
39
42
  async compileWithWatch(platformData, projectData, prepareData) {
40
43
  return new Promise(async (resolve, reject) => {
41
44
  if (this.bundlerProcesses[platformData.platformNameLowerCase]) {
@@ -67,7 +70,7 @@ class BundlerCompilerService extends events_1.EventEmitter {
67
70
  console.log("Received Vite IPC message:", message);
68
71
  }
69
72
  // Copy Vite output files directly to platform destination
70
- const distOutput = path.join(projectData.projectDir, constants_1.VITE_DIST_FOLDER_NAME);
73
+ const distOutput = this.getViteDistOutputPath(projectData.projectDir);
71
74
  const destDir = path.join(platformData.appDestinationDirectoryPath, this.$options.hostProjectModuleName);
72
75
  if (debugLog) {
73
76
  console.log(`Copying from ${distOutput} to ${destDir}.`);
@@ -232,7 +235,7 @@ class BundlerCompilerService extends events_1.EventEmitter {
232
235
  // launch with `Check failed: has_pending_exception()`.
233
236
  if (isVite) {
234
237
  try {
235
- const distOutput = path.join(projectData.projectDir, constants_1.VITE_DIST_FOLDER_NAME);
238
+ const distOutput = this.getViteDistOutputPath(projectData.projectDir);
236
239
  const destDir = path.join(platformData.appDestinationDirectoryPath, this.$options.hostProjectModuleName);
237
240
  this.copyViteBundleToNative(distOutput, destDir);
238
241
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nativescript",
3
3
  "main": "./lib/nativescript-cli-lib.js",
4
- "version": "9.1.0-alpha.1",
4
+ "version": "9.1.0-alpha.2",
5
5
  "author": "NativeScript <oss@nativescript.org>",
6
6
  "description": "Command-line interface for building NativeScript projects",
7
7
  "bin": {