vlcn-io / js

Components to build apps in JavaScript atop cr-sqlite
MIT License
51 stars 6 forks source link

import.meta breaks Jest tests #19

Open jamesgpearce opened 10 months ago

jamesgpearce commented 10 months ago

This new line is causing me some problems with Jest ("Cannot use 'import.meta' outside a module"). Until recently, I could transpile the crsqlite-wasm module.

https://github.com/vlcn-io/js/blame/30c8d32598d4f538900883507300c0727bfb465d/packages/crsqlite-wasm/src/serialize.ts#L44

I figure I can work around it, but just a heads-up.

jamesgpearce commented 10 months ago

For the record, this Babel plugin seems to fix it: https://www.npmjs.com/package/babel-plugin-transform-vite-meta-env