webtorrent / webtorrent

⚡️ Streaming torrent client for the web

Home Page:https://webtorrent.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not use the old `import ... assert` syntax.

nicolo-ribaudo opened this issue · comments

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.

commented

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