-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Support for yarn 2 pnp #26
Comments
Hi @mikevalstar , thank you for your feature request! I just added support for yarn2 pnp, but we must add runtime dependencies like this: {
"dependencies": {
"@babel/core": "^7.10.3",
"@babel/plugin-proposal-class-properties": "^7.10.1",
"@babel/plugin-proposal-object-rest-spread": "^7.10.3",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-react-jsx": "^7.10.3",
"@babel/plugin-transform-runtime": "^7.10.3",
"@babel/preset-env": "^7.10.3",
"@babel/preset-react": "^7.10.1",
"@babel/preset-typescript": "^7.10.1",
"@babel/runtime-corejs3": "^7.10.3",
"@react-ssr/core": "latest",
"@react-ssr/express": "latest",
"babel-plugin-css-modules-transform": "^1.6.2",
"babel-plugin-react-require": "^3.1.3",
"express": "^4.17.1",
"lz-string": "^1.4.4",
"pnp-webpack-plugin": "^1.6.4",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"urlsafe-base64": "^1.0.0"
},
"installConfig": {
"pnp": true
}
} (Because react-ssr uses lots of babel configs and tricky server side rendering. (e.g. Any ideas? Because of this, I think |
If you have some time, please try Another way is to use |
amazing; works great. (I am and was using @react-ssr/express) I am getting an error/warning when booting (this does not cause any bad effects, but thought I would point it out) ERROR in ./react-ssr-src/entry-index.jsx |
They are changing how they do dependencies in yarn 2 so I think adding the runtime dependencies like you have done is correct. This is still one of the major working items with Yarn 2 as far as I have been following. https://dev.to/arcanis/introducing-yarn-2-4eh1#deprecating-bundle-dependencies I actually dont use Next.js for any of my current projects but they did put support into their roadmap: https://github.com/vercel/next.js/milestone/22?closed=1 As a bit of an aside and background, the project(s) I'm currently working on are for a client that has a couple of issues that Yarn 2 solves:
So our ideal solution is to include the packages in the repo so the app can deploy and boot faster |
As part of yarn 2 they are adding a new method of accessing dependencies: pnp
https://classic.yarnpkg.com/en/docs/pnp/
https://classic.yarnpkg.com/en/docs/pnp/getting-started
since you're using webpack this can be supported using
https://github.com/arcanis/pnp-webpack-plugin
Thanks
The text was updated successfully, but these errors were encountered: