Closed paulsutherland closed 3 months ago
Hey Paul, thanks for sharing. Can you create a PR?
Hi James,
I have created a pull request that updates the rollup config.
I was not sure how to update the library. I see punycode being used in toolbox.js in the lib, but this is ES6 and the advice from the punycode repo details cjs. I tried to update the import, but nothing worked.
Since updating the main.cjs file in the dist to var punycode = require('punycode/');
resolves the deprecation warning, the simplest change was to update the rollup config.
I hope that is helpful.
Cheers...
Paul
Thanks for the PR - it doesn't look like that approach is exactly right. Maybe we need some more googling to see how others solved the problem.
Hi,
I receive this warning in my console:
If you change the import from:
to
It resolves the issue. See the note on the punycode repo:
⚠️ Note that userland modules don't hide core modules. For example, require('punycode') still imports the deprecated core module even if you executed npm install punycode. Use require('punycode/') to import userland modules rather than core modules.
Cheers...
Paul