-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
The babel.config.js is exposed, but refers to a source file not available #202
Comments
Good call! Just opened a PR to address this. We actually need the So, instead of changing that file, we've added a new file called
How's that? We are going to be deploying a bunch of new stuff either later tonight or tomorrow - and this is definitely doable within that release! |
Awesome! Just writing a reply in the discussion about module aliases (#201) that that is exactly what is needed for doing it through Babel in I feel a clean and stable enough way (also when upgrading NextJS or Payload). And... my import / require OCD is extra happy with it being a separately named |
This issue has been automatically locked. |
Not sure if this is a bug, but feels like at least something NextJS offers in a way that is very convenient and that it's understable you guys may have missed this is as being a thing, like me, if you work locally on a full Payload repo, but not for others that just run the npm version of Payload breaking.
Bug Report
When setting up a babel.config.js that can work with both NextJs and Payload I was trying to import babel.config.js from both. That all seemed to work, since I was using my local fork of Payload, that contains the /src folder. When I however had other devs run it all hell broke loose. After some digging I found that Payload is exporting babel.config.js, but that it's a redirect to
/src/babel.config.js
, which is of course not available in the release version on npm./babel.config.js
Expected Behavior
Return like NextJS the babel.config.js used so you can import it and extend it in your project
Current Behavior
No fun with the misleading babel.config.js sitting there as though I could use it, but just breaking things
Possible Solution
In the
yarn run copyfiles
step maybe add copyingsrc/babel.config.js
and change the require to match in./babel.config.js
For now I fixed it with a good old copy past from the src folder into my project folder, so other devs could quickly continue, but something to hopefully not be necessary. Would be nice to just like with NextJS feel that I can customise babel.config.js without every release checking if I need to update my copy-pasted babel.config.js 😅
The text was updated successfully, but these errors were encountered: