Skip to content

Commit 2e5544d

Browse files
committed
test
1 parent 66f1a87 commit 2e5544d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

packages/core/src/plugins/entryModuleLoader.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

tests/integration/directive/index.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff 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]) => {

0 commit comments

Comments
 (0)