aurelia / webpack-plugin

A plugin for webpack that enables bundling Aurelia applications.
MIT License
90 stars 36 forks source link

fix(package): add "types" field #142

Closed michaelbull closed 6 years ago

michaelbull commented 6 years ago

The distribution includes a "types" declaration directory, however this was not identified in the package.json file. This commit adds the "types" field, pointing to "dist/types/index.d.ts".

jods4 commented 6 years ago

Thanks for your contribution.

Typings were originally included in our package.json but it created problems for awesome-typescript-loader users, see this open issue s-panferov/awesome-typescript-loader#484.

We "temporarily" removed the typings to work-around this, as this loader proved to be popular at the time.

As long as this issue is not resolved, or until ATL falls out of fashion -- typescript-loader having adopted its "speed features" -- I don't think that we want to bring the typings back into package.json.

Alexander-Taran commented 6 years ago

)-: could add a line to readme then?

jods4 commented 6 years ago

We sure could.

I'm not satisfied about this situation but at-loader proved to be very popular (at least at the time) and many users reported the issue.

Another option that might be worth considering is publishing the build-time types of aurelia-webpack-loader in @types? That would provide an easy solution for people using ts-loader and wanting types for their build.

Alexander-Taran commented 6 years ago

Well at does not work well with wp4 as far as I recall? and publishing @types is kinda overkill while non of the other libs are there.. all the typings are included.. Also the typscript audience is a part of all audience of which even smaller part goes .ts way for webpack config.

A line in readme/wiki/changelog is fine.

jods4 commented 6 years ago

I believe at is loosing ground. I am all for bringing back the types but we would need either a fix in at or data that shows at isn't used as much nowadays. Not sure about WP4 compat, but looking the github repo it seems they have a compatible release coming up.

In the meantime, a line in the readme is a good idea.