@bonsae/nrg 0.12.0 → 0.12.1
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 +1 -1
- package/vite/index.js +2 -33
package/package.json
CHANGED
package/vite/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/vite/plugin.ts
|
|
2
|
-
import
|
|
2
|
+
import path13 from "path";
|
|
3
3
|
|
|
4
4
|
// src/vite/defaults.ts
|
|
5
5
|
var DEFAULT_OUTPUT_DIR = "./dist";
|
|
@@ -2411,9 +2411,6 @@ function serverPlugin(options) {
|
|
|
2411
2411
|
}
|
|
2412
2412
|
|
|
2413
2413
|
// src/vite/plugins/build.ts
|
|
2414
|
-
import { execSync } from "child_process";
|
|
2415
|
-
import fs12 from "fs";
|
|
2416
|
-
import path13 from "path";
|
|
2417
2414
|
function buildPlugin(options) {
|
|
2418
2415
|
const {
|
|
2419
2416
|
serverBuildOptions,
|
|
@@ -2427,34 +2424,6 @@ function buildPlugin(options) {
|
|
|
2427
2424
|
async buildStart() {
|
|
2428
2425
|
try {
|
|
2429
2426
|
logger.intro();
|
|
2430
|
-
logger.startSpinner("Type checking");
|
|
2431
|
-
const serverTsconfig = path13.resolve(
|
|
2432
|
-
serverBuildOptions.srcDir ?? "./src/server",
|
|
2433
|
-
"tsconfig.json"
|
|
2434
|
-
);
|
|
2435
|
-
const clientTsconfig = path13.resolve(
|
|
2436
|
-
clientBuildOptions.srcDir ?? "./src/client",
|
|
2437
|
-
"tsconfig.json"
|
|
2438
|
-
);
|
|
2439
|
-
const tsconfigsToCheck = [serverTsconfig, clientTsconfig].filter(
|
|
2440
|
-
(p) => fs12.existsSync(p)
|
|
2441
|
-
);
|
|
2442
|
-
try {
|
|
2443
|
-
for (const tsconfig of tsconfigsToCheck) {
|
|
2444
|
-
execSync(`npx tsc -p ${tsconfig} --noEmit`, {
|
|
2445
|
-
stdio: ["inherit", "pipe", "pipe"],
|
|
2446
|
-
encoding: "utf-8"
|
|
2447
|
-
});
|
|
2448
|
-
}
|
|
2449
|
-
logger.stopSpinner("Type checked");
|
|
2450
|
-
} catch (e) {
|
|
2451
|
-
logger.stopSpinner("Type check failed");
|
|
2452
|
-
const output = (e.stdout || "") + (e.stderr || "");
|
|
2453
|
-
if (output) {
|
|
2454
|
-
console.error(output);
|
|
2455
|
-
}
|
|
2456
|
-
throw new BuildError("type-check", e);
|
|
2457
|
-
}
|
|
2458
2427
|
logger.startSpinner("Cleaning");
|
|
2459
2428
|
cleanDir(buildContext.outDir);
|
|
2460
2429
|
logger.stopSpinner("Cleaned");
|
|
@@ -2497,7 +2466,7 @@ function nodeRed(options = {}) {
|
|
|
2497
2466
|
options.nodeRedLauncherOptions
|
|
2498
2467
|
);
|
|
2499
2468
|
const extraFilesCopyTargets = options.extraFilesCopyTargets ?? DEFAULT_EXTRA_FILES_COPY_TARGETS;
|
|
2500
|
-
const resolvedOutDir =
|
|
2469
|
+
const resolvedOutDir = path13.resolve(outDir);
|
|
2501
2470
|
const buildContext = {
|
|
2502
2471
|
outDir: resolvedOutDir,
|
|
2503
2472
|
packageName: getPackageName(),
|