1fa0068610
When esm package that depending on react is used between `pages/` and `app/`, it's loading the user installed react through esm loader which doesn't go through require hook, so we cannot intercept it with require-hook. Disable esm resolving when `appDir` is enabled for now, prefering to pick the cjs bundle so that react import is intercepted by require hook and pointing to the built-in react Co-authored-by: JJ Kasper <jj@jjsweb.site>
12 lines
202 B
TypeScript
12 lines
202 B
TypeScript
import {
|
|
loadRequireHook,
|
|
overrideBuiltInReactPackages,
|
|
} from '../build/webpack/require-hook'
|
|
|
|
loadRequireHook()
|
|
|
|
const isPrebundled = false
|
|
|
|
if (isPrebundled) {
|
|
overrideBuiltInReactPackages()
|
|
}
|