Closed
Description
Details
alias: {
react: 'react-native',
},
If we want to make react
alias to react-native
, and the alias behaviour will affected by externals
config
bundle
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 set output.externals
to make alias work
output: {
externals: {
react: 'react-native',
},
},
bundleless
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
output: {
externals: {
react: 'react-native',
},
},
Metadata
Metadata
Assignees
Labels
No labels