-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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
Babel support for files outside the root next directory #12890
Comments
I've removed Fast Refresh from the title because this feature request is not related to that feature directly. The issue is that Next.js only compiles your application's code via Babel. |
Closing this as a duplicate of #706, as all code outside of your page root is treated as "external code", including Please note this has probably uncovered another issue in your app: that you're not compiling a portion of your code! |
ah, in that case I'm surprised things are even working at all ;) |
Have you customized your webpack configuration in |
we had this all working before with |
I hadn't actually gotten to the build step as I was first trying to get fast refresh working as that is what I was most excited about ;) |
@Timer I'm slightly confused because even with out |
Could you share a full demo? It'll help so we're both on the same page. |
yeah, let me setup a test case |
@Timer here is an example repo: https://github.com/chrisdrackett/next-external-test Notable here is that fast refresh works with the file in |
Can confirm that this custom babel config stops Fast Refresh from working normally:
|
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Feature request
Is your feature request related to a problem? Please describe.
Right now if you alias code outside of the main
next
directory fast refresh will not work with that code. Ideally the code could also trigger a fast refreshDescribe the solution you'd like
enable fast refresh on all code
Describe alternatives you've considered
The code in question is shared between multiple projects so I can't easily move it into the next directory. Not sure if there are other potential solutions.
The text was updated successfully, but these errors were encountered: