noledgebin / frontend

NoledgeBin is a zero-knowledge pastebin
https://andinus.unfla.me/noledgebin/
GNU Affero General Public License v3.0
1 stars 1 forks source link

Evaluate switching to esbuild #24

Open andinus opened 2 years ago

andinus commented 2 years ago

parcel has moved to v2, which didn't work on OpenBSD last I tried. Anyways, it is pulling a lot of dependencies. I don't think it's a good idea for a project with "e2ee" and things.

esbuild seems simpler & faster.

andinus commented 2 years ago

It is indeed a lot faster and the build process looks simpler.

However there is an issue, one of our dependencies crypto-random-string needs crypto -- there is crypto-browserify that can be a substitute for crypto. And looking at our previous package-lock.json, it seems that parcel was doing exactly that. I'm not sure how we could do this with esbuild.

✘ [ERROR] Could not resolve "crypto"

    node_modules/crypto-random-string/index.js:2:19:
      2 │ import crypto from 'crypto';
        ╵                    ~~~~~~~~

  The package "crypto" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "--platform=node" to do that, which will remove this error.

1 error