@@ -16,7 +16,14 @@ import {
16
16
17
17
import glob from 'tiny-glob' ;
18
18
import path from 'node:path' ;
19
- import { defaultClientConditions , defaultClientMainFields } from 'vite' ;
19
+ import { env } from 'node:process' ;
20
+ import * as vite from 'vite' ;
21
+ const {
22
+ defaultClientConditions,
23
+ defaultClientMainFields,
24
+ //@ts -expect-error not typed in vite
25
+ rolldownVersion
26
+ } = vite ;
20
27
import { describe , expect , it } from 'vitest' ;
21
28
22
29
describe ( 'kit-node' , ( ) => {
@@ -93,18 +100,23 @@ describe('kit-node', () => {
93
100
} ) ;
94
101
95
102
if ( isBuild ) {
96
- it ( 'should not include dynamic import from onmount in ssr output' , async ( ) => {
97
- const ssrManifest = JSON . parse (
98
- readFileContent ( '.svelte-kit/output/server/.vite/manifest.json' )
99
- ) ;
100
- const serverFilesSrc = Object . values ( ssrManifest )
101
- . filter ( ( e ) => ! ! e . src )
102
- . map ( ( e ) => e . src ) ;
103
- const includesClientOnlyModule = serverFilesSrc . some ( ( file : string ) =>
104
- file . includes ( 'client-only-module' )
105
- ) ;
106
- expect ( includesClientOnlyModule ) . toBe ( false ) ;
107
- } ) ;
103
+ // this is known to fail, skip the test in our own CI but keep it in ecosystem-ci so that rolldown-vite-ecosystem-ci still gets this fail
104
+ // TODO remove skip once fixed
105
+ it . skipIf ( rolldownVersion && ! env . ECOSYSTEM_CI ) (
106
+ 'should not include dynamic import from onmount in ssr output' ,
107
+ async ( ) => {
108
+ const ssrManifest = JSON . parse (
109
+ readFileContent ( '.svelte-kit/output/server/.vite/manifest.json' )
110
+ ) ;
111
+ const serverFilesSrc = Object . values ( ssrManifest )
112
+ . filter ( ( e ) => ! ! e . src )
113
+ . map ( ( e ) => e . src ) ;
114
+ const includesClientOnlyModule = serverFilesSrc . some ( ( file : string ) =>
115
+ file . includes ( 'client-only-module' )
116
+ ) ;
117
+ expect ( includesClientOnlyModule ) . toBe ( false ) ;
118
+ }
119
+ ) ;
108
120
it ( 'should include dynamic import from onmount in client output' , async ( ) => {
109
121
const clientManifest = JSON . parse (
110
122
readFileContent ( '.svelte-kit/output/client/.vite/manifest.json' )
0 commit comments