-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: disable
autoExternal
in bundleless mode and only redirect re…
…quest not in node_modules (#624)
- Loading branch information
1 parent
b1cffee
commit b6b21b3
Showing
17 changed files
with
138 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "auto-external-bundle-false-test", | ||
"private": true, | ||
"devDependencies": { | ||
"ora": "8.1.1", | ||
"react": "^19.0.0" | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
tests/integration/auto-external/bundle-false/rslib.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { defineConfig } from '@rslib/core'; | ||
import { generateBundleCjsConfig, generateBundleEsmConfig } from 'test-helper'; | ||
|
||
export default defineConfig({ | ||
lib: [ | ||
generateBundleEsmConfig({ | ||
bundle: false, | ||
}), | ||
generateBundleCjsConfig({ | ||
bundle: false, | ||
}), | ||
], | ||
source: { | ||
entry: { | ||
index: ['./src/**'], | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import type { oraPromise } from 'ora'; | ||
import React from 'react'; | ||
|
||
export type { oraPromise }; | ||
export const foo = () => { | ||
return React.version; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "@rslib/tsconfig/base", | ||
"compilerOptions": { | ||
"baseUrl": "./" | ||
}, | ||
"include": ["src"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
// can not be resolved | ||
import lodash from 'lodash'; | ||
// can be resolved but not specified -- phantom dependency | ||
import prettier from 'prettier'; | ||
import bar from './bar.js'; | ||
import foo from './foo'; | ||
|
||
console.log('prettier: ', prettier); | ||
|
||
export default lodash.toUpper(foo + bar); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
// can not be resolved | ||
import lodash from 'lodash'; | ||
// can be resolved but not specified -- phantom dependency | ||
import prettier from 'prettier'; | ||
|
||
import { bar as bar2 } from '@/bar'; | ||
import { foo as foo2 } from '@/foo'; | ||
import { baz } from '~/baz'; | ||
import { bar } from './bar'; | ||
import { foo } from './foo'; | ||
|
||
console.log('prettier: ', prettier); | ||
|
||
export default lodash.toUpper(foo + bar + foo2 + bar2 + baz); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.