Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parcel compatibility #29

Open
MyNewToken opened this issue Apr 23, 2021 · 0 comments
Open

Parcel compatibility #29

MyNewToken opened this issue Apr 23, 2021 · 0 comments

Comments

@MyNewToken
Copy link

My code (inside an ES6 module)
import load from 'blake3/browser-async'

Parcel warnings
Could not load source file "../../ts/browser/wasm.ts" in source map of "node_modules/blake3/esm/browser/wasm.js". ⚠️ Could not load source file "../../ts/browser/index.ts" in source map of "node_modules/blake3/esm/browser/index.js". ⚠️ Could not load source file "../../ts/browser/index.ts" in source map of "node_modules/blake3/esm/browser/index.js". ⚠️ Could not load source file "../../ts/browser/wasm.ts" in source map of "node_modules/blake3/esm/browser/wasm.js". ⚠️ Could not load source file "../../ts/base/index.ts" in source map of "node_modules/blake3/esm/base/index.js". ⚠️ Could not load source file "../../ts/browser/hash-instance.ts" in source map of "node_modules/blake3/esm/browser/hash-instance.js". ⚠️ Could not load source file "../../ts/browser/hash-fn.ts" in source map of "node_modules/blake3/esm/browser/hash-fn.js". ⚠️ Could not load source file "../../ts/base/hash-instance.ts" in source map of "node_modules/blake3/esm/base/hash-instance.js". ⚠️ Could not load source file "../../ts/base/hash-reader.ts" in source map of "node_modules/blake3/esm/base/hash-reader.js". ⚠️ Could not load source file "../../ts/base/hash-fn.ts" in source map of "node_modules/blake3/esm/base/hash-fn.js". ⚠️ Could not load source file "../../ts/base/disposable.ts" in source map of "node_modules/blake3/esm/base/disposable.js". ⚠️ Could not load source file "../../ts/browser/encoding.ts" in source map of "node_modules/blake3/esm/browser/encoding.js". ⚠️ Could not load source file "../../ts/browser/hash-reader.ts" in source map of "node_modules/blake3/esm/browser/hash-reader.js". ⚠️ Could not load source file "../../ts/browser/hash.ts" in source map of "node_modules/blake3/esm/browser/hash.js". ⚠️ Could not load source file "../../ts/browser/hash-instance.ts" in source map of "node_modules/blake3/esm/browser/hash-instance.js". ⚠️ Could not load source file "../../ts/base/index.ts" in source map of "node_modules/blake3/esm/base/index.js". ⚠️ Could not load source file "../../ts/browser/hash-fn.ts" in source map of "node_modules/blake3/esm/browser/hash-fn.js". ⚠️ Could not load source file "../../ts/base/hash-fn.ts" in source map of "node_modules/blake3/esm/base/hash-fn.js". ⚠️ Could not load source file "../../ts/base/hash-reader.ts" in source map of "node_modules/blake3/esm/base/hash-reader.js". ⚠️ Could not load source file "../../ts/browser/encoding.ts" in source map of "node_modules/blake3/esm/browser/encoding.js". ⚠️ Could not load source file "../../ts/browser/hash-reader.ts" in source map of "node_modules/blake3/esm/browser/hash-reader.js". ⚠️ Could not load source file "../../ts/browser/hash.ts" in source map of "node_modules/blake3/esm/browser/hash.js". ⚠️ Could not load source file "../../ts/base/hash-instance.ts" in source map of "node_modules/blake3/esm/base/hash-instance.js".

Browser console
Uncaught SyntaxError: Cannot use 'import.meta' outside a module
Coming from app. ... .js file generated by Parcel
function init(module) { if (typeof module === 'undefined') { module = import.meta.url.replace(/\.js$/, '_bg.wasm'); } ...

I am a bit of a JS noob, so any help would be greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant