-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Using layout:
in *.mdx
causes build to crash
#10502
Comments
I'm having the same error just after performing "@astrojs/mdx": "^2.2.0",
"@astrojs/react": "^3.1.0",
"astro": "^4.5.5", |
It seems like it's a babel issue. The results are different between v7.24.0 and v7.24.2. I still don't know which package of babel is the problem. |
We'll see how long Babel takes to fix this. If it takes more than a few hours, we'll have to pin it. In the meantime you can use the following snippet in your {
"overrides": {
"@babel/helper-module-imports": "~7.22.15"
},
"pnpm": {
"overrides": {
"@babel/helper-module-imports": "~7.22.15"
}
},
"resolutions": {
"@babel/helper-module-imports": "~7.22.15"
}
} |
I submitted a PR to babel. |
I'm releasing a new |
Released as 7.24.3 |
Made a PR to ensure we're using the latest version! Thank you all for working on this so quickly, awesome work. |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
If you use
layout:
in a*.mdx
file like the following, theastro build
command will generate an error and exit.If you put a breakpoint here and look at the
result.code
afterbabel.transformAsync
,astro/packages/astro/src/vite-plugin-mdx/index.ts
Line 36 in 2fc7231
you will see that
import
is duplicated.I'm not sure which babel plugin it's a problem with.
What's the expected result?
The build is successful.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-razdlq?file=src%2Fpages%2Findex.mdx
Participation
The text was updated successfully, but these errors were encountered: