standard-things / esm

Tomorrow's ECMAScript modules today!
Other
5.26k stars 146 forks source link

"type": "module" in package.json throws an error #784

Closed guybedford closed 5 years ago

guybedford commented 5 years ago

I'm running the SystemJS tests with mocha -b -r esm, where the package.json of SystemJS didn't previously have "type": "module" set. The tests are located in test/*.js.

As soon as I added "type": "module" to the package, I get the error:

/home/guybedford/Projects/systemjs/test/import-map.js:1
import './fixtures/tracing.js';
       ^

SyntaxError: Unexpected string
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)

Setting "mode": "all" or "use module" doesn't seem to fix this either.

Any help would be much appreciated.

jdalton commented 5 years ago

You caught me with partial supported added. I'll revert the partial type support until I can better support it fully.

guybedford commented 5 years ago

Thanks, yeah as long as it doesn't throw I'd be happy :)

mhofman commented 5 years ago

Any chance to get a release with this fix?