Comments (11)
Yep, I'm thinking of a good way to support this going forward. I think I might need to change the Terser plugin back to minifying the bundle chunks instead of as a transform hook or something similar. Will test some approaches this week after I finished up the plugins I've been working on 😄
from denopack.
Thanks for renaming the issue btw 👍
from denopack.
Hey @PaulLeCam what version of denopack are you using? Could you share your denopack config?
I'm not 100% certain, but I think the issue isn't necessarily the fact that it's using WASM, so I'd like to investigate it further.
from denopack.
Yes WASM is my assumption but that might be something else, this was just the most obvious difference I found between std/hash
and other std
libraries.
Here is a simple way I could reproduce the issue (I'm using Deno 1.3.0):
File test.ts
:
export { createHash } from 'https://deno.land/[email protected]/hash/mod.ts'
And running:
deno run --unstable --allow-env --allow-net --allow-read --allow-write https://deno.land/x/[email protected]/cli.ts bundle -i test.ts
from denopack.
@PaulLeCam I have some good news and bad news:
the good news is that as far as I know, this is not related to WASM, and I'm fairly certain bundling WASM should work.
the bad news however is that this is related to the fact that Terser does not support top level awaits yet and this is used inside of the implementation of std/hash.
https://deno.land/[email protected]/hash/_wasm/hash.ts {
error: SyntaxError: Unexpected await identifier inside strict mode
I will leave this issue open as this is fairly annoying to anyone wanting to use std/hash
from denopack.
Thanks for investigating!
Too bad about Terser, I guess it's even a larger problem than std/hash
because any module could possibly user a top-level await
.
from denopack.
I think I fixed this in a terser update a few weeks ago.
from denopack.
Does Terser 5 support TLA now?
from denopack.
I think that is why I updated it in the first place... can't remember now though. I'll check real quick.
from denopack.
Oh never mind - I updated because optional chaining... so this is not fixed yet.
from denopack.
Yeah I just checked and the issue regarding awaits on Terser's github is still open :c sucks but we'll keep an eye out on it ;)
from denopack.
Related Issues (20)
- DENO_DIR is not set HOT 5
- bug: non root html emit does not work HOT 1
- Support import maps HOT 2
- [BUG] pluginCssBundle doesn't resolve locations correctly
- deno fmt precommit hook
- Remote debugging in VS Code HOT 1
- Multiple decorators are not getting called HOT 2
- [BUG] Installation error in Deno 1.5.x: CertNotValidForName HOT 4
- [BUG] Getting a 500 Internal Server Error while installing HOT 1
- [BUG] Cannot destructure property 'output' HOT 3
- [BUG] Debugging experience is very poor HOT 4
- [BUG] Ignores directories in output filename/sourcemap HOT 1
- [Problem]: No longer works with Deno 1.7.0
- [BUG] Can't install (No such host is known.)
- Security Issue: Request for contact
- Move readme to docs site
- TS error in rollup dependency on package install/run HOT 8
- Frontend related roadmap
- Polyfilled Node version of Rollup
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from denopack.