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: wrong regex in middleware url pattern #295

Closed
wants to merge 1 commit into from

Conversation

dtinth
Copy link

@dtinth dtinth commented Dec 24, 2017

I upgraded karma-webpack to the latest version. It seems that assets emitted directly to the webpack’s output.path directory (not in a subdirectory) couldn’t be found.

Debugging this issue reveals that the regex used to tell karma to delegate to webpack-dev-server is incorrect. It has an extra / at the end. I assume that the author intended to say $ instead, since there is already a / in front, (otherwise, there is no point in having .*).

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)
http://localhost:9876/tmp/_karma_webpack_/24476c7dae9a65fd37e5.worker.js returns 404.

What is the new behavior?
http://localhost:9876/tmp/_karma_webpack_/24476c7dae9a65fd37e5.worker.js now returns the emitted file as intended.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information:

Workaround: Just make sure you setup loaders (e.g. file-loader, worker-loader) to emit files inside a directory instead.

This causes files emitted to publicPath not in a subdirectory to fail to load.
@jsf-clabot
Copy link

jsf-clabot commented Dec 24, 2017

CLA assistant check
All committers have signed the CLA.

dtinth added a commit to bemusic/bemuse that referenced this pull request Dec 24, 2017
@michael-ciniawsky
Copy link
Contributor

(Should be) fixed by #293. Please reopen if it shouldn't. Thx :)

@michael-ciniawsky
Copy link
Contributor

Released in v2.0.10 🎉 Please try it out

@michael-ciniawsky michael-ciniawsky removed this from the 2.0.10 milestone Feb 25, 2018
rajr5 pushed a commit to rajr5/bemuse that referenced this pull request Jun 23, 2023
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.

3 participants