Giter Club home page Giter Club logo

Comments (1)

mochaaP avatar mochaaP commented on June 21, 2024

Also see the explanation in #94 (comment).

No need for a runtime environment variable at all

There was never one.

We can ALWAYS generate two builds - one with the inlined binary, and one that loads the binary from a separate file

Sounds good to me!
Does this mean that with upstream Node builds, we use the inline binary ones (CJS, not exported in package.json), and load from an external file when loaded as a NPM module (ESM, exported in package.json)?

If this is the case: we'd like to keep a separate script in this repo, to generate a CJS shim for Node to load the builtin from an external NPM module in downstream distro builds.

Also, can I implement this by further stripping on top of #91? To be honest, I'm not a huge fan of @babel/cli and terser here 😅. CI was also broken by the revert.

No environment variable is then needed for the build script at all

An addition optional --without-cjs/esm flag could be nice, but that's not a hard requirement. Please let me know what you think about it.

Only one define variable is needed for WASM_BINARY- whether or not the binary is being generated inline, with the undefined case indicating the external case, unless we absolutely need to customize the external path at build time?

Yes. That would work!

from cjs-module-lexer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.