Git Product home page Git Product logo

Comments (4)

chrisfentiman avatar chrisfentiman commented on July 29, 2024 1

Hi @Songkeys,

This looks great - on inspection, it seems to operate the way you intend. Unfortunately, this approach/package didn't work for our company and so we decided to go in a different direction to create a package that wasn't dependent on anything except the users' environment. We've also added a number of other features to the conversion process.

However - I do believe that your fix will resolve the original issue.

If you wanted to checkout how we solved the issue see -> https://github.com/ConvertibleCo/tswig

from tsconfig-to-swcconfig.

Songkeys avatar Songkeys commented on July 29, 2024

Thank you for the report! For the second solution, I didn't use Typescript as a dependency because it was too large for the file loading requirements. However, now I believe it is more promising as you pointed out; we can make it a peer dependency since every project with a tsconfig.json file should already have Typescript installed. What do you think?

from tsconfig-to-swcconfig.

chrisfentiman avatar chrisfentiman commented on July 29, 2024

While I agree that TypeScript is a large dependency, I believe it is reasonable to assume that anyone using tsconfig-to-swcconfig is a TypeScript user and would already have the TypeScript dependency installed. Therefore, making TypeScript a peer dependency of the package seems like a logical approach, which will also reduce the package size and improve installation times.

However, with this new dependency, the package will also need to clearly state what versions of TS it supports and be able to handle changes in the API for backward compatibility. Quickly crunching some numbers from NPM downloads over the last 7 days, it's pretty safe to assume that if the package supports TS v3+, it will cover the majority of users.

This would be a large package refactor and a robust test suite to ensure backward compatibility. However, I think the effort is worth the reward, as I have not found a package that does tsconfig to swc well, and seeing as swc has no desire to do this, feels worth it.

from tsconfig-to-swcconfig.

Songkeys avatar Songkeys commented on July 29, 2024

Could you please take a look at PR #15? I also released [email protected], which you can try out on your machine. Let me know if it works for you.

I just checked out the typescript implementation. There is a ts.readConfigFile function, but it only reads; we still need to manually merge extends. (Please let me know if I'm mistaken about this). So I decided to stick with the current implementation.

from tsconfig-to-swcconfig.

Related Issues (9)

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.