Files
Jiachi LiuandGitHub 3738e8ecc0 Fix react-refresh for transpiled packages (#60563)
### What

We're applying react-refresh to browser layer and inject ESM or CJS
helper based on file type. Some package from `trasnpilePackages` might
contain CJS browser bundle. And injecting ESM helper breaks them.
Actually they don't need to have fast refresh ability since they're in
`node_modules`.

### How
Skip react-refresh for transpiled packages as they're in node_modules
and won't change.

Fixes #56487 
Closes NEXT-2061
2024-01-12 21:44:41 +01:00

14 lines
283 B
JavaScript

'use client'
import { instance } from 'cjs-modern-syntax'
import { packageName } from 'transpile-cjs-lib'
export default function Page() {
return (
<>
<div id="private-prop">{instance.getProp()}</div>
<div id="transpile-cjs-lib">{packageName}</div>
</>
)
}