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

Do not use the old import ... assert syntax. #2777

Open
nicolo-ribaudo opened this issue Apr 20, 2024 · 1 comment
Open

Do not use the old import ... assert syntax. #2777

nicolo-ribaudo opened this issue Apr 20, 2024 · 1 comment
Labels

Comments

@nicolo-ribaudo
Copy link

nicolo-ribaudo commented Apr 20, 2024

This package is using the legacy "import assertions" proposal, to import a JSON file in

import info from './package.json' assert { type: 'json' }
.

That proposal now uses a different syntax: import info from './package.json' with { type: 'json' }. The old syntax is only supported in Node.js and Chrome, and they are both planning to remove support for it (Node.js 22 next week, and Chrome 126 in June), so it will make this package not work anymore.

For more info, see tc39/proposal-import-attributes#135.

@ThaUnknown
Copy link
Member

it was used because it was compatible with webpack, while with wasnt, feel free to PR a fix

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

No branches or pull requests

2 participants