@@ -190,7 +190,7 @@ export function qwikVite(qwikViteOpts: QwikVitePluginOptions = {}): any {
190
190
pluginOpts . input = viteConfig . build ?. lib . entry ;
191
191
}
192
192
}
193
- if ( sys . env === 'node' ) {
193
+ if ( sys . env === 'node' || sys . env === 'bun' ) {
194
194
const fs : typeof import ( 'fs' ) = await sys . dynamicImport ( 'node:fs' ) ;
195
195
196
196
try {
@@ -552,7 +552,7 @@ export function qwikVite(qwikViteOpts: QwikVitePluginOptions = {}): any {
552
552
) ;
553
553
554
554
const sys = qwikPlugin . getSys ( ) ;
555
- if ( tmpClientManifestPath && sys . env === 'node' ) {
555
+ if ( tmpClientManifestPath && ( sys . env === 'node' || sys . env === 'bun' ) ) {
556
556
// Client build should write the manifest to a tmp dir
557
557
const fs : typeof import ( 'fs' ) = await sys . dynamicImport ( 'node:fs' ) ;
558
558
await fs . promises . writeFile ( tmpClientManifestPath , clientManifestStr ) ;
@@ -567,7 +567,7 @@ export function qwikVite(qwikViteOpts: QwikVitePluginOptions = {}): any {
567
567
// ssr build
568
568
569
569
const sys = qwikPlugin . getSys ( ) ;
570
- if ( sys . env === 'node' ) {
570
+ if ( sys . env === 'node' || sys . env === 'bun' ) {
571
571
const outputs = Object . keys ( rollupBundle ) ;
572
572
573
573
// In order to simplify executing the server script with a common script
@@ -781,7 +781,7 @@ const findQwikRoots = async (
781
781
packageJsonDir : string
782
782
) : Promise < QwikPackages [ ] > => {
783
783
const paths = new Map < string , string > ( ) ;
784
- if ( sys . env === 'node' ) {
784
+ if ( sys . env === 'node' || sys . env === 'bun' ) {
785
785
const fs : typeof import ( 'fs' ) = await sys . dynamicImport ( 'node:fs' ) ;
786
786
let prevPackageJsonDir : string | undefined ;
787
787
do {
0 commit comments