Skip to content

Declaration bundler plugin #634

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

Closed
wants to merge 7 commits into from
Closed

Declaration bundler plugin #634

wants to merge 7 commits into from

Conversation

mblandfo
Copy link
Contributor

Add option to bundle files into a single .d.ts file

#263

@johnnyreilly
Copy link
Member

I'll take a look at this once we've sorted out the other PR 😄

@mblandfo
Copy link
Contributor Author

I'll need to add more documentation for the limitations here - typescript's compilerOptions.target must be "AMD" or "System". This is the same limitation typescript has on combining to a single outFile. Also, I think file export names must match file names.

@johnnyreilly
Copy link
Member

johnnyreilly commented Sep 12, 2017

First of all - well done for your work.

However, I've been thinking about this some more and I'm not sure it makes sense for this functionality to be part of ts-loader itself. I think it makes more sense for this to be published to npm as a separate project and maintained separately.

I've a couple of reasons which I hope you'll understand:

  1. It's not core ts-loader functionality; ts-loader is basically about taking typescript, turning into javascript and feeding it to webpack. The plugin here is not part of that functionality and so it doesn't feel to me like it "belongs" in ts-loader.

  2. There is more than one typescript webpack loader (one day I hope we'll all join together but that hasn't happened yet). The functionality in this plugin could / should be used by anyone using any loader ideally. If it becomes part of ts-loader then that won't be possible.

I'd be perfectly happy to have documentation in ts-loader that links to this plugin (just as we have docs that link to the fork-ts-checker-webpack-plugin etc) But I don't think this functionalty should land in ts-loader directly for the reasons given.

I hope you understand my reasoning. I'm sorry if I've wasted your time a little here - I didn't mean to. Hopefully you can lift the work you've done here directly into a plugin to publish to npm. What do you think?

@mblandfo
Copy link
Contributor Author

Ok, no worries, thanks for looking at this.

@mblandfo mblandfo closed this Sep 12, 2017
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

Successfully merging this pull request may close these issues.

2 participants