Commit graph

5 commits

Author SHA1 Message Date
JJ Kasper
070239e666
Revert "Merge e2e test node_modules (#40926)" (#40974)
This reverts commit b508fef218.

Fixes: https://github.com/vercel/next.js/actions/runs/3139454323/jobs/5100342131

We aren't able to modify the filesystem for E2E deployments so this reverts the change introduced in the above PR to ensure deployment tests are able to run correctly with custom `node_modules`.
2022-09-28 08:08:46 +00:00
Jiachi Liu
b508fef218
Merge e2e test node_modules (#40926)
Merge e2e tests customized `node_modules` with installed `node_modules`,
to let you debug easily locally without moving folder between
`node_modules` and `node_modules_bak`

Also add `optoutServerComponentsBundle` to config schema.
2022-09-27 15:18:08 +02:00
Jiachi Liu
71f5f258ab
Setup require hook in next-server for styled-jsx resolving (#39305)
* Use require hook and alias to resolve styled-jsx

* re-export styled-jsx types from compiled

* fix lint

* add test for styled-jsx css

* setup require hook in server

* compile import path to styled-jsx/style

* revert require hook

* add test for server styled-jsx resolving

* update test

* pre copy styled-jsx assets

* fix styled-jsx dts

* add npmrc for styled-jsx e2e test

* load require hook directly

* rm legacy test

* fix lint

* fix pnpm install error

* split require hook

* only alias styled-jsx

* make styled-jsx resolving statically analyzable

* update test

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-08-08 20:27:42 -05:00
Jiachi Liu
fcec758779
Flush initial styled-jsx in gIP first in concurrent rendering (#36594)
* Use flushed effects to generate styled-jsx styles insted of gIP by default

* ensure styles are flushed inside the default getInitialProps

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Shu Ding <g@shud.in>
2022-05-02 22:52:46 +02:00
Jiachi Liu
7a09f88d14
Reexports styled-jsx JSXStyle in nextjs (#36585)
When using pnpm / yarnPnP to install next.js, styled-jsx as dependency is not hoisted in the top level node_modules, it will fail when nodejs is trying to resolve `styled-jsx/style` from project directory. Re-export `styled-jsx/style` in next.js and let swc/babel plugin compile the import path it to `next/dist/shared/lib/styled-jsx`

Resolves #10149
Closes #21320
Closes #9325



Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
2022-04-30 20:25:05 +00:00