global-jsdom/register has invalid mjs import syntax
Closed this issue · 4 comments
pearofducks commented
import jsdom from '.';
should be changed to import jsdom from './index.mjs';
Suffix-less imports aren't allowed in modules unless one explicitly enables the node-resolution-algorithm.
This currently fails with:
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import 'PATH/node_modules/global-jsdom/esm/' is not supported resolving ES modules imported from PATH/node_modules/global-jsdom/esm/register.mjs
modosc commented
thanks for the report - can you add a repro test for this in the examples/
directory? i thought this was already covered but i must be missing a usage pattern.
pearofducks commented
No problem, repro added in #85
modosc commented
hey @pearofducks can you check out the 8.0.0-beta.0
i just published on npm? it includes the specs from #85 and should solve those issues.
modosc commented
published 8.0.0
on npm, lmk if you have any issues!