webpack-config-plugins icon indicating copy to clipboard operation
webpack-config-plugins copied to clipboard

Fix #18

Open nemchik opened this issue 5 years ago • 6 comments

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: link tbd.
  • [x] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] tooling / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

.d.ts files are included in webpack

Issue Number: #18

What is the new behavior?

.d.ts files are not included in webpack

Does this PR introduce a breaking change?

[x] Yes
[ ] No

Other information

nemchik avatar Jan 01 '21 14:01 nemchik

Forgot I need a changelog entry. Not sure the cadence for adding changes for a new version (will have a look at the commit history of the changelog).

nemchik avatar Jan 01 '21 17:01 nemchik

This is a breaking change as it will break all apps which use .d.ts files

jantimon avatar Jan 04 '21 07:01 jantimon

This is a breaking change as it will break all apps which use .d.ts files

I admit I am fairly new to typescript. What would be the purpose of including the .d.ts files in a webpack bundle? The readme here says the plugin configs are based on ts-loader best practices which as far as I can tell do not include the .d.ts files in the bundle.

nemchik avatar Jan 04 '21 14:01 nemchik

I also now realize i tagged this as fixing the wrong issue. It should be #18 . I will rebase to reword the commit and edit the PR title. My apologies. (too many tabs open)

nemchik avatar Jan 04 '21 14:01 nemchik

@jantimon I had a look at the commit history for the changelog and it really looks like the only changes to the master branch are releases. If this PR were to be accepted should I aim for this PR to be considered a point release? Or is the branch strategy to merge from PRs into a staged branch that gets merged into master as a release at a later time?

nemchik avatar Jan 04 '21 14:01 nemchik

https://github.com/TypeStrong/ts-loader/pull/1277 removed the example used as the base for the configuration in ts-config-webpack-plugin. All of their current examples do not include .d.ts files. It seems all of their current examples also don't use the cache-loader or thread-loader, but that's outside the scope of this PR.

Anyway I'm still struggling to see the validity of having definition files included in the webpack bundle. I'd really like to learn what the reason for this would be.

nemchik avatar Apr 07 '21 14:04 nemchik