Coder Social home page Coder Social logo

Comments (3)

baskager avatar baskager commented on June 11, 2024 3

If it is intended behavior it does deviate from tsc. This could cause issues for people. For instance: When one wants to generate type definitions (.d.ts files). This is not yet supported in SWC.

The above-mentioned issue was actually our exact case, the new types were able to be imported from our packages as expected but the .js files were still outdated. (see following command example).

e.g.

npx tsc --declaration --emitDeclarationOnly && npx swc --config-file .swcrc ./src -d dist

Would place the compiled .js files in /dist/src/ and the corresponding type definitions in /dist/.


Breaking changes such as this come as kind of a surprise and lead to strange behavior after an update of NPM packages. In addition there is little communication about the breaking change which then turns it into a bit of a "needle-in-a-haystack" situation. Would love to brainstorm and help out on this point if you're on board with that πŸ‘

Thanks for taking the time reading my ramblings, much appreciated ☺️

from cli.

kdy1 avatar kdy1 commented on June 11, 2024 1

See #281

from cli.

kdy1 avatar kdy1 commented on June 11, 2024 1

Closing as fixed by #283.
You can use --strip-leading-paths to get the old behavior.

from cli.

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.