https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • a

    advaith

    01/14/2021, 10:20 PM
    w/ webpack
  • t

    TiltMeSenpai

    01/14/2021, 10:46 PM
    I haven't tried tweetnacl, but stablelib is ~50-100ms to verify, my shim is ~10ms
  • a

    advaith

    01/14/2021, 11:32 PM
    hm, im trying to use console.log but it logs some
    ConsoleAPICalled
    which doesnt seem to show the actual data
  • a

    advaith

    01/14/2021, 11:34 PM
    ah its just broken? https://github.com/cloudflare/wrangler/issues/1707
  • a

    advaith

    01/14/2021, 11:39 PM
    downgrading to 1.12.2 fixed it
  • a

    albert-zhao

    01/14/2021, 11:41 PM
    ah, can you comment that on the GitHub issue?
  • a

    advaith

    01/14/2021, 11:43 PM
    👍
  • a

    albert-zhao

    01/14/2021, 11:44 PM
    thank you
  • a

    advaith

    01/14/2021, 11:44 PM
    oh they said in the original post that downgrading fixes it
  • a

    advaith

    01/14/2021, 11:44 PM
    already commented
  • a

    albert-zhao

    01/14/2021, 11:46 PM
    o that's perfectly fine, helps push this to the team's attention when more users report the same issue
  • a

    advaith

    01/15/2021, 12:20 AM
    does webpack not support modern js features like BigInts and nullish coalescing? I'm trying to use them (and packages which use them) with the workers typescript template but keep getting > Module parse failed: Unexpected token (17:95) > You may need an appropriate loader to handle this file type.
  • a

    advaith

    01/15/2021, 12:22 AM
    weird that its not supported out of the box
  • p

    Peps

    01/15/2021, 12:25 AM
    you need to change the
    target
    in the tsconfig.json to
    es2018
    for it to work IIRC
  • a

    advaith

    01/15/2021, 12:26 AM
    doesnt work
  • a

    advaith

    01/15/2021, 12:26 AM
    and it was on
    esnext
  • p

    Peps

    01/15/2021, 12:26 AM
    weird, because that worked for me with that same template

    https://cdn.discordapp.com/attachments/245224226267594754/799434344145092638/unknown.png▾

  • a

    advaith

    01/15/2021, 12:27 AM
  • a

    advaith

    01/15/2021, 12:29 AM
    oh
  • a

    advaith

    01/15/2021, 12:29 AM
    optional chaining works with es2018 but not esnext
  • a

    advaith

    01/15/2021, 12:29 AM
    but bigint literals dont
  • a

    advaith

    01/15/2021, 12:30 AM
    still weird though, since theyre both part of the es spec, there shouldnt be any issues
  • a

    advaith

    01/15/2021, 12:30 AM
    ts shouldnt have to transpile it to an old version
  • j

    James

    01/15/2021, 12:31 AM
    Webpack@5 fixes this AFAIK.
  • a

    advaith

    01/15/2021, 12:31 AM
    even if i set target back to es3 bigints still dont work
  • a

    advaith

    01/15/2021, 12:31 AM
    hm i'll try it
  • p

    Peps

    01/15/2021, 12:32 AM
    According to typescript it will apparently only work if you target es2020 and above

    https://cdn.discordapp.com/attachments/245224226267594754/799435763984367657/unknown.png▾

  • j

    James

    01/15/2021, 12:33 AM
    Oh TypeScript, nevermind on my comment then. That'll be a TS config, yeah. BigInts are pretty new to land in JS
  • a

    advaith

    01/15/2021, 12:33 AM
    installed webpack@latest (
    "webpack": "^5.14.0"
    ), still not working
  • a

    advaith

    01/15/2021, 12:34 AM
    with target es2020 (which also breaks optional chaining and nullish coalescing like esnext)
1...484950...2509Latest