Skip to content

Commit 8ff111b

Browse files
committed
Only load vite6 and rollup4 if they're used
1 parent 0c6491e commit 8ff111b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/integration-tests/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"include": ["./**/*"],
55
"compilerOptions": {
66
"esModuleInterop": true,
7+
"skipLibCheck": true,
78
"types": ["node", "jest"]
89
}
910
}

packages/integration-tests/utils/create-cjs-bundles.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import * as vite from "vite";
2-
import * as vite6 from "vite6";
32
import * as path from "path";
43
import * as rollup from "rollup";
5-
import * as rollup4 from "rollup4";
64
import { default as webpack4 } from "webpack4";
75
import { webpack as webpack5 } from "webpack5";
86
import * as esbuild from "esbuild";
@@ -40,7 +38,8 @@ export function createCjsBundles(
4038
});
4139
}
4240

43-
if (plugins.length === 0 || plugins.includes("vite6")) {
41+
if (NODE_MAJOR_VERSION >= 18 && plugins.length === 0 || plugins.includes("vite6")) {
42+
const vite6 = require("vite6");
4443
void vite6.build({
4544
clearScreen: false,
4645
build: {
@@ -75,6 +74,7 @@ export function createCjsBundles(
7574
}
7675

7776
if ((NODE_MAJOR_VERSION >= 18 && plugins.length === 0) || plugins.includes("rollup4")) {
77+
const rollup4 = require("rollup4");
7878
void rollup4
7979
.rollup({
8080
input: entrypoints,

0 commit comments

Comments
 (0)