static directory is too static 🗿
#611
Replies: 3 comments
-
|
A few questions
In our case, we add this to the emails. But there's no way to know where the user is uploading their static files. const baseUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: ''; |
Beta Was this translation helpful? Give feedback.
-
|
I understand that one does need to setup the paths correctly in a mail template to get assets working. The easiest solution would be to make the static folder path configurable so people that use It would be a great boost in DX if I just drag my assets to Another thing is if one is using the static directory in the root, next.js shows a deprecation warning that could lead to confusion for some people. |
Beta Was this translation helpful? Give feedback.
-
|
@bukinoshita I could set some time aside to implement a solution to this an file a PR. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
One of the following would be cool becuase I want my static files to work in
email devand production.staticandpublic/static, if they existpublic/staticBackground
I am using
react-emailin a NextJs app and I want to serve the static folder with my app, this requires files to live in thepublicdirectory.NextJs also shows a warning because the
staticdirectory is deprecated.The static directory has been deprecated in favor of the public directory. https://nextjs.org/docs/messages/static-dir-deprecatedProposal
I would just copy files from
staticandpublic/static, whichever exists, it would be the simplest solution.Beta Was this translation helpful? Give feedback.
All reactions