We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
output.externals
resolve.alias
alias: { react: 'react-native', },
If we want to make react alias to react-native, and the alias behaviour will affected by externals config
react
react-native
externals
In bundle mode, the autoExternal is default set to true, so react will be externals to ^react($|\\/|\\\\).
autoExternal
^react($|\\/|\\\\)
So the alias config is invalid after externals set.
We should set autoExternal: false or set output.externals to make alias work
autoExternal: false
output: { externals: { react: 'react-native', }, },
In bundleless mode, we use externals like below to generate bundleless output.
rslib/packages/core/src/config.ts
Line 506 in 4b5f674
So the react request is callback here, so alias config is invalid after externals set.
We need to set output.externals to make alias work, and the alias config turn out to be logic that won't be executed
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Details
If we want to make
react
alias toreact-native
, and the alias behaviour will affected byexternals
configbundle
In bundle mode, the
autoExternal
is default set to true, so react will be externals to^react($|\\/|\\\\)
.So the alias config is invalid after externals set.
We should set
autoExternal: false
or setoutput.externals
to make alias workbundleless
In bundleless mode, we use externals like below to generate bundleless output.
rslib/packages/core/src/config.ts
Line 506 in 4b5f674
So the react request is callback here, so alias config is invalid after externals set.
We need to set
output.externals
to make alias work, and the alias config turn out to be logic that won't be executedThe text was updated successfully, but these errors were encountered: