rsnext/packages
OJ Kwon 775e898603
feat(next-core): build time client|server-only assertion (#61732)
### 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
2024-02-08 09:04:43 +01:00
..
create-next-app v14.1.1-canary.43 2024-02-07 23:21:21 +00:00
eslint-config-next v14.1.1-canary.43 2024-02-07 23:21:21 +00:00
eslint-plugin-next v14.1.1-canary.43 2024-02-07 23:21:21 +00:00
font v14.1.1-canary.43 2024-02-07 23:21:21 +00:00
next Skip client-side data-fetching after ssr error (#51377) 2024-02-07 17:24:26 -08:00
next-bundle-analyzer v14.1.1-canary.43 2024-02-07 23:21:21 +00:00
next-codemod v14.1.1-canary.43 2024-02-07 23:21:21 +00:00
next-env v14.1.1-canary.43 2024-02-07 23:21:21 +00:00
next-mdx v14.1.1-canary.43 2024-02-07 23:21:21 +00:00
next-plugin-storybook v14.1.1-canary.43 2024-02-07 23:21:21 +00:00
next-polyfill-module v14.1.1-canary.43 2024-02-07 23:21:21 +00:00
next-polyfill-nomodule v14.1.1-canary.43 2024-02-07 23:21:21 +00:00
next-swc feat(next-core): build time client|server-only assertion (#61732) 2024-02-08 09:04:43 +01:00
react-dev-overlay v14.1.1-canary.43 2024-02-07 23:21:21 +00:00
react-refresh-utils v14.1.1-canary.43 2024-02-07 23:21:21 +00:00
third-parties v14.1.1-canary.43 2024-02-07 23:21:21 +00:00