Giter Site home page Giter Site logo

Webpack Integration about tscpaths HOT 5 OPEN

inakiarroyo avatar inakiarroyo commented on July 16, 2024
Webpack Integration

from tscpaths.

Comments (5)

stavalfi avatar stavalfi commented on July 16, 2024 1

@iarroyo5 haha.. I was close to it. but if you don't want to use my loader or any other tool to generate d.ts files, there is still a chance.

if you don't produce a typescript library, you don't have to. everything will work if you generate a website (index.html) so there is no need to create the .d.ts files in the first place because noone will use them. in this case, you can even drop the ts-loader from your build and only use https://github.com/TypeStrong/fork-ts-checker-webpack-plugin (which I hope you use anyways in any kind of build with typescript).

from tscpaths.

inakiarroyo avatar inakiarroyo commented on July 16, 2024 1

Totally agreed with you, but in my case I was using them for producing typescript libraries. By the way, many thanks for sharing the https://github.com/TypeStrong/fork-ts-checker-webpack-plugin, I'll give a try on my current/future builds 👍 as a performance improvement.

from tscpaths.

naffiq avatar naffiq commented on July 16, 2024

You can use webpack's aliases https://webpack.js.org/configuration/resolve/ instead

from tscpaths.

stavalfi avatar stavalfi commented on July 16, 2024

@naffiq It won't really help him because typescript will still generate *.d.ts files with the wrong paths.

@iarroyo5 I craated a webpack-loader that does what this repository does but during webpack-build: https://github.com/stavalfi/babel-plugin-module-resolver-loader

from tscpaths.

inakiarroyo avatar inakiarroyo commented on July 16, 2024

@stavalfi thanks for creating the plugin and sharing it here, but I drop the use of absolute paths with Webpack and TS. Everything works much better, painless with relative paths.

from tscpaths.

Related Issues (15)

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.