GithubHelp home page GithubHelp logo

Comments (2)

bitjson avatar bitjson commented on May 5, 2024

Hey @panshul007 – good question! Thanks for opening the issue.

tsconfig.module.json is actually an entirely separate build. If you look at the build script, we actually compile your project twice. I should probably add this to the readme. (thanks!)

Here's a draft explanation, please let me know if it's clear enough:

Multiple builds (main and module)

The src of typescript-starter is compiled into two separate builds, the main and module build. The main build is configured to use the CommonJS module system, while the module build uses the new ES6 module system.

Because Node.js does not yet support the ES6 module system, Node.js projects which depend on typescript-starter will follow the main field in package.json. Tools which support the new system (like Rollup) will follow the module field, giving them the ability to tree shake typescript-starter.

Note: by default, the main build is the only one exercised by the tests. While both builds are nearly identical, there are real differences in how the two module systems work. For most libraries, this won't be an issue, but for libraries with functionality that varies based on the module system used (generally a bad idea), additional testing is required.

from typescript-starter.

pgbytes avatar pgbytes commented on May 5, 2024

Thanks, the explains a lot.

from typescript-starter.

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.