File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -205,8 +205,7 @@ class AstroBuilder {
205205 key : keyPromise ,
206206 } ;
207207
208- const { internals, ssrOutputChunkNames } =
209- await viteBuild ( opts ) ;
208+ const { internals, ssrOutputChunkNames } = await viteBuild ( opts ) ;
210209
211210 const hasServerIslands = this . settings . serverIslandNameMap . size > 0 ;
212211 // Error if there are server islands but no adapter provided.
Original file line number Diff line number Diff line change @@ -356,8 +356,7 @@ async function cleanServerOutput(
356356) {
357357 const out = getOutDirWithinCwd ( opts . settings . config . outDir ) ;
358358 // The SSR output chunks for Astro are all .mjs files
359- const files = ssrOutputChunkNames
360- . filter ( ( f ) => f . endsWith ( '.mjs' ) ) ;
359+ const files = ssrOutputChunkNames . filter ( ( f ) => f . endsWith ( '.mjs' ) ) ;
361360 if ( internals . manifestFileName ) {
362361 files . push ( internals . manifestFileName ) ;
363362 }
@@ -367,10 +366,7 @@ async function cleanServerOutput(
367366 files . map ( async ( filename ) => {
368367 const url = new URL ( filename , out ) ;
369368 const map = new URL ( url + '.map' ) ;
370- await Promise . all ( [
371- fs . promises . rm ( url ) ,
372- fs . promises . rm ( new URL ( map ) ) . catch ( ( e ) => { } )
373- ] ) ;
369+ await Promise . all ( [ fs . promises . rm ( url ) , fs . promises . rm ( new URL ( map ) ) . catch ( ( e ) => { } ) ] ) ;
374370 } ) ,
375371 ) ;
376372
@@ -426,7 +422,7 @@ async function ssrMoveAssets(opts: StaticBuildOptions) {
426422 cwd : fileURLToPath ( serverAssets ) ,
427423 } ) ;
428424
429- console . log ( " FILES2" , files ) ;
425+ console . log ( ' FILES2' , files ) ;
430426
431427 if ( files . length > 0 ) {
432428 await Promise . all (
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ describe('Astro basic build', () => {
169169
170170 it ( 'server sourcemaps not included in output' , async ( ) => {
171171 const files = await fixture . readdir ( '/' ) ;
172- const hasSourcemaps = files . some ( fileName => {
172+ const hasSourcemaps = files . some ( ( fileName ) => {
173173 return fileName . endsWith ( '.map' ) ;
174174 } ) ;
175175 assert . equal ( hasSourcemaps , false , 'no sourcemap files in output' ) ;
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ describe('Sourcemap', async () => {
1818
1919 it ( 'Builds non-empty sourcemap' , async ( ) => {
2020 const assets = await fixture . readdir ( '/_astro' ) ;
21- const maps = assets . filter ( file => file . endsWith ( '.map' ) ) ;
21+ const maps = assets . filter ( ( file ) => file . endsWith ( '.map' ) ) ;
2222 assert . ok ( maps . length > 0 , 'got source maps' ) ;
23- for ( const mapName of maps ) {
23+ for ( const mapName of maps ) {
2424 const filename = `/_astro/${ mapName } ` ;
2525 const map = await fixture . readFile ( filename ) ;
2626 assert . equal ( map . includes ( '"sources":[]' ) , false ) ;
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ function getViteConfiguration(
6060 'react/jsx-runtime' ,
6161 'react/jsx-dev-runtime' ,
6262 'react-dom' ,
63- 'react-compiler-runtime'
63+ 'react-compiler-runtime' ,
6464 ] ,
6565 exclude : [ reactConfig . server ] ,
6666 } ,
You can’t perform that action at this time.
0 commit comments