775e898603
### What This PR injects a build-time error for the turbopack if `client|server-only` is imported in incorrect context. The basic idea is using resolve plugin, so in resolve time if matching context (which alises erroneous import), raise a build time error. Unfortunately this won't fix all of the tests in `invalid-imports`, due to 1. resolveplugin does not have way to trace import from transformed, so not able to detect `styled-jsx` from using `<styled..` tags 2. webpack (in our implementation) and turbopack's resolveplugin have different order of transform / module trace chain, so enabling resolve plugin in some context raises build error instead of runtime error in rsc-build-error. Closes PACK-2397 |
||
---|---|---|
.. | ||
create-next-app | ||
eslint-config-next | ||
eslint-plugin-next | ||
font | ||
next | ||
next-bundle-analyzer | ||
next-codemod | ||
next-env | ||
next-mdx | ||
next-plugin-storybook | ||
next-polyfill-module | ||
next-polyfill-nomodule | ||
next-swc | ||
react-dev-overlay | ||
react-refresh-utils | ||
third-parties |