Skip to content
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

Support for the experimental syntax 'importAttributes' isn't currently enabled #936

Closed
1 task
jahirfiquitiva opened this issue Feb 2, 2024 · 1 comment · Fixed by #939
Closed
1 task

Comments

@jahirfiquitiva
Copy link
Contributor

What version of million are you using?

3.0.2

Are you using an SSR adapter? If so, which one?

Vercel

What package manager are you using?

yarn

What operating system are you using?

Mac

What browser are you using?

Arc

Describe the Bug

I tried upgrading my website from v 2.6.4 to 3.0.2 but started getting this error.

unhandledRejection SyntaxError: /Users/jahir/dev/jahir/website/.contentlayer/generated/index.mjs: Support for the experimental syntax 'importAttributes' isn't currently enabled (7:43):

   5 | // NOTE During development Contentlayer imports from `.mjs` files to improve HMR speeds.
   6 | // During (production) builds Contentlayer it imports from `.json` files to improve build performance.
>  7 | import allBlogs from './Blog/_index.json' assert { type: 'json' }
     |                                           ^
   8 |
   9 | export { allBlogs }
  10 |

Add @babel/plugin-syntax-import-attributes (https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes) to the 'plugins' section of your Babel config to enable parsing.

What's the expected result?

The build should be completed normal and successfully

Link to Minimal Reproducible Example

I don't have one, sorry. But here's a PR with the changes I did: jahirfiquitiva/jahir.dev#73

Participation

  • I am willing to submit a pull request for this issue.
Copy link

github-actions bot commented Feb 2, 2024

Thanks for opening this issue! A maintainer will review it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant