NX Monorepo support #585
Replies: 7 comments 1 reply
-
You do not need to use yarn. You can use NPM if you want I took a look at the code, but the dev server does use the root of your If not, can you provide a sample repo in which you want to integrate this project? |
Beta Was this translation helpful? Give feedback.
-
Here's a sample repo where it works and doesn't work: https://github.com/williamgkzhang/nx-react-email works with Basically it'd be nice to generate the Line in question: The Or perhaps a cli flag to pick the |
Beta Was this translation helpful? Give feedback.
-
I ended up using Ladle and Vite just to render emails for now with nx. Works decently. |
Beta Was this translation helpful? Give feedback.
-
I'm also interested in this, maybe check how https://www.mailing.run/ do it, as it was easy to set up in an Nx monorepo I found a solution (sort of) for react-email: create a Next.js lib with the Nx generator, add a // project.json
"serve": {
"command": "npm run --prefix libs/path/to/your/libl/src dev"
}, // package.json
{
"private": true,
"workspaces": [
".react-email"
],
"scripts": {
"dev": "email dev",
"export": "email export"
},
"dependencies": {
"@react-email/body": "0.0.2",
// Other dependencies
"@react-email/text": "0.0.5",
"react-email": "1.9.3"
}
} It makes it so you can still import all the emails from |
Beta Was this translation helpful? Give feedback.
-
Does anyone know how this would work with Turborepo? I have started this discussion here |
Beta Was this translation helpful? Give feedback.
-
I think this is one of the problems that are going to be solved when #960 gets merged and there is no more |
Beta Was this translation helpful? Give feedback.
-
I had a go at setting this up. Added some comments in the readme: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, first of all, thank you for your work, it's a really great and promising lib :)
It would be really great if react-email could integrate in an NX monorepo.
Actually, we have to run
email dev
, that creates a folder.react-email
and we have to add a yarn.lock into it to install dependencies.Is it possible to make a thing about it ? Like create an adapter that doesnt create this folder and uses root package.json ?
Or maybe I miss something..
Thanks :)
Beta Was this translation helpful? Give feedback.
All reactions