-
Notifications
You must be signed in to change notification settings - Fork 220
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
Regression in v2.0.8 using webpack file-loader #284
Comments
Should there be a trailing slash here? |
Also, I think prior to Sure, I'll attempt a PR :) |
Prior to codymikol#297, the following paths would always end with a slash: - `webpackOptions.output.publicPath` - `webpackOptions.output.publicPath` - `webpackMiddlewareOptions.publicPath` Fixes codymikol#284
Sorry for the delay. I just tried 2.0.9 and the problem is still there. I can't re-open the issue though, should I create a new one? |
The trailing slash is an improvement but I still get a 404:
|
We still get 404 errors using:
An URL generated by file-loader results in a 404 in the log, when actually being requested: import TestImageURL from '!!file-loader!images/test_image.jpg';
fdescribe('static file handling', () => {
it('should load the requested file', (done) => {
fetch(TestImageURL).then( response => {
expect( response.status ).toBe(200);
done();
});
});
});
It was still working with karma-webpack-2.0.6, though. @gdetrez: did you open a new issue or sovle this somehow? |
@PSpSynedra No, I haven't opened a new issue. There's #291 that seems a bit similar but I haven't looked in details so maybe not. My current solution is to pin the version of karma-webpack to 2.0.7. |
@michael-ciniawsky @PSpSynedra At least for our use case, it seems that 2.0.13 finally solved this issue 🎉 |
@gdetrez Same here. With 2.0.13 it is gone and everything works fine. |
I'm submitting a bug report
Webpack version: 3.10.0
Webpack Karma version: 2.0.8
Karma version: 1.7.1
Please tell us about your environment: Linux
Browser: Chrome
Current behavior:
I have tests that looks a bit like this:
This used to work fine but with the release of 2.0.8, it doesn't work anymore.
In the output, I can see that:
I think that the introduction of the tmpdir is preventing karma from finding the image emitted by webpack...
Expected/desired behavior:
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with a gist/jsbin of your webpack configuration.
I made a repository that shows the problem: https://github.com/gdetrez/karma-webpack-issue
What is the expected behavior?
The
image
variable should contain the path where karma serves the image.What is the motivation / use case for changing the behavior?
Regression?
The text was updated successfully, but these errors were encountered: