-
Notifications
You must be signed in to change notification settings - Fork 29
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
Double inclusion of referenced files #50
Comments
Hi @Valve, |
I'm having a look at this right now. The problem is actually more deeply rooted than this gem...the problem is found in the typescript-node gem because it specifies
Well, |
@markeissler I looked into it myself some time ago and found what you've found too :) The ts compiler lacks this option it seems, but I need to check it for v 2.3. Anyway, I dropped the idea to use TS in my Rails project because of the bad state of TS tooling in Rails. I hope to give it another shot with Rails 5.1 and webpack (because it supports it with webpacker gem). |
@Valve TS 2.3 still lacks any option to do this. The closest you can get is specifying Another option would be to compile using --outDir and then select and cache files that have been already compiled but that's a silly waste of time on a bigger project. This is what happens with all of this highly opinionated software dev. :( I'm considering just ditching the dependency on typescript-node (and, in turn, typescript-src) and just leaning on a call to |
@Valve I just released a new gem (typescript-monkey) that behaves in a more rails-like fashion. My gem also supports inline typescript (using <script> tags). |
Assuming I have application.js with
And file1.js.ts is:
And file2.js.ts is:
When I do asset compilation I end up with
dependency1
being included 3 times into the resulting file.First time it's from application.js inclusion, second and third is from file1.js.ts and file2.js.ts respectively.
As far as I can tell this happens because of: https://github.com/typescript-ruby/typescript-rails#referenced-typescript-dependencies
Questions:
Thanks for your help
The text was updated successfully, but these errors were encountered: