Skip to content
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

fix(karma-webpack): Override output.filename with '[name].js' #381

Merged
merged 2 commits into from
Dec 17, 2018

Conversation

matthieu-foucault
Copy link
Collaborator

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

If there are multiple tests, and the webpack configuration has a static output.filename, e.g. 'bundle.js', all entry points will be emitted to the same bundle. Karma will output errors, and karma-webpack will ultimately fail as test files will not have any corresponding output file.

@matthieu-foucault
Copy link
Collaborator Author

@thijstriemstra: this pull request should fix your issue

@thijstriemstra
Copy link

thanks for the ping @matthieu-foucault, can i install and test this PR using npm?

@matthieu-foucault
Copy link
Collaborator Author

thanks for the ping @matthieu-foucault, can I install and test this PR using npm?

Yes, using npm install webpack-contrib/karma-webpack#fix-static-output.filename

@matthieu-foucault matthieu-foucault added this to the 4.0.0 milestone Dec 9, 2018
@thijstriemstra
Copy link

works: "karma-webpack@4.0.0-beta.0"
doesn't work: "karma-webpack@4.0.0-rc.5"
this PR: works!

thanks @matthieu-foucault

@matthieu-foucault matthieu-foucault changed the title fix(karma-webpack): Override output.filename if it is a static file name fix(karma-webpack): Override output.filename with '[name].js' Dec 14, 2018
@matthieu-foucault matthieu-foucault merged commit 2f47250 into master Dec 17, 2018
@matthieu-foucault matthieu-foucault deleted the fix-static-output.filename branch December 17, 2018 03:26
@thijstriemstra
Copy link

@matthieu-foucault can this be released as a new RC?

@matthieu-foucault
Copy link
Collaborator Author

@thijstriemstra Done! Sorry for the delay

@thijstriemstra
Copy link

thijstriemstra commented Jan 31, 2019

thanks. for some reason it doesn't allow me to install rc.6

No matching version found for karma-webpack@4.0.0-rc.6

And dev installs rc.5...

@matthieu-foucault
Copy link
Collaborator Author

It does appear in npmjs though (under the next tag): https://www.npmjs.com/package/karma-webpack/v/4.0.0-rc.6

dev should install v5 alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants