-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Ensure a separate webpack instance is created for different loader options #1104
Conversation
…ions are used Add execution test for this behaviour
Looks like you've a lint issue? |
This is awesome work! Thank you! 🥰 Could you update the version number in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tweak!
CHANGELOG.md
Outdated
@@ -1,5 +1,8 @@ | |||
# Changelog | |||
|
|||
## v7.0.4 | |||
* [Ensure a separate webpack instance is created for different loader options](https://github.com/TypeStrong/ts-loader/pull/1104) - @appzuka |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you thank yourself please? It's traditional now 🤗
Shipping with https://github.com/TypeStrong/ts-loader/releases/tag/v7.0.4 Thanks for your help 🤗🌻 |
I am pleased to be able to help. If there are other issues you don't have time to look into, in this or other repos, please let me know and I'll investigate when I have some time. |
Thanks @appzuka! All help is always gratefully received 🥰 There's always issues and I'm massively time poor. If you should spot something that catches your eye, do feel free to have a go! Thanks again 😊 |
…tions (TypeStrong#1104) * Ensure a separate webpack instance is created if different loader options are used Add execution test for this behaviour * Fix import order (lint error) * Update version to 7.04 and include in changelog * Tweak to Changelog
This patch automatically creates a new webpack instance if ts-loader is invoked with different loader options.
This behaviour could be created manually by including the 'instance' option on each loader, but it is easy to miss that this is necessary. My application failed with update 7.0.0 because I used 2 different sets of options and did not appreciate that the second set would be ignored unless I specified a different instance string.
This update tags the instance with a hash of the options specified and will create a new instance if the hashes do not match. This behaviour will function even if the options specified are functions, such as getCustomTransformers.
A new execution test, loaderOptions, has been added to test this functionality.