File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
packages/core/src/plugins
tests/integration/directive Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,14 @@ const loader: LoaderDefinition = function loader(source) {
1010 let result = source ;
1111
1212 if ( this . resourceQuery === `?${ RSLIB_ENTRY_QUERY } ` ) {
13- const rest1 = result . split ( '\n' ) . slice ( 1 ) ;
13+ const rest1 = result . split ( os . EOL ) . slice ( 1 ) ;
1414 if ( source . startsWith ( SHEBANG_PREFIX ) ) {
15- result = rest1 . join ( '\n' ) ;
15+ result = rest1 . join ( os . EOL ) ;
1616 }
1717
1818 const [ firstLine , ...rest2 ] = result . split ( os . EOL ) ;
1919 if ( REACT_DIRECTIVE_REGEX . test ( firstLine ! ) ) {
20- result = rest2 . join ( '\n' ) ;
20+ result = rest2 . join ( os . EOL ) ;
2121 }
2222 }
2323
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ describe('shebang', async () => {
77 const { entries } = await buildAndGetResults ( { fixturePath } ) ;
88
99 test ( 'shebang at the beginning' , async ( ) => {
10- console . log ( '😧1' , entries . esm0 ! ) ;
1110 expect ( entries . esm0 ! . startsWith ( '#!/usr/bin/env node' ) ) . toBe ( true ) ;
1211 } ) ;
1312
@@ -24,7 +23,6 @@ describe('react', async () => {
2423 return path . basename ( key ) === 'bar.js' ;
2524 } ) ?. [ 1 ] ;
2625
27- console . log ( '😧2' , bar ! ) ;
2826 expect ( bar ! . startsWith ( `'use server';` ) ) . toBe ( true ) ;
2927
3028 const foo = Object . entries ( contents . esm0 ! ) . find ( ( [ key ] ) => {
You can’t perform that action at this time.
0 commit comments