Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack Integration #5

Open
inakiarroyo opened this issue Jan 18, 2019 · 5 comments
Open

Webpack Integration #5

inakiarroyo opened this issue Jan 18, 2019 · 5 comments

Comments

@inakiarroyo
Copy link

Is there any change to integrate it with ts-loader or awesome-typescript-loader ?

@naffiq
Copy link

naffiq commented Mar 6, 2019

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

@stavalfi
Copy link

stavalfi commented Aug 9, 2019

@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

@inakiarroyo
Copy link
Author

@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.

@stavalfi
Copy link

@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).

@inakiarroyo
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants