irori / js-fatfs

JavaScript/TypeScript bindings for the FatFs library.
https://www.npmjs.com/package/js-fatfs
Other
4 stars 1 forks source link

Set type=module in package.json #2

Closed acheronfail closed 5 months ago

acheronfail commented 5 months ago

This package uses ESM (the wasm build uses EXPORT_ES6 and the import variable is used in dist/fatfs.js), however the package.json file doesn't contain "type": "module", so when I try to run this package it fails with:

/Users/cosmotherly/atlassian/src/nxkit/node_modules/js-fatfs/dist/fatfs.js:3
  var _scriptDir = import.meta.url;
                          ^^^^

SyntaxError: Cannot use 'import.meta' outside a module

So this PR sets "type": "module" in the package.json to fix it.

irori commented 5 months ago

Thanks!