-
Notifications
You must be signed in to change notification settings - Fork 50
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
Comments
You can use webpack's aliases https://webpack.js.org/configuration/resolve/ instead |
@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 |
@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. |
@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). |
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. |
Is there any change to integrate it with ts-loader or awesome-typescript-loader ?
The text was updated successfully, but these errors were encountered: