OutputPath is joined with publicPath? #160
Comments
I've the same issue. When I point out the outputPath, the final file path gets concatenated with the public path. It shouldn't be happening. const image = require('../images/image.png'); My config: {
test: /\.(png|jpe?g|gif|svg)$/,
loader: 'file-loader?name=[hash].[ext]&outputPath=../assets/images/&publicPath=assets/images/'
} I get this string |
I have the same issue. Am I not using it right? Can someone define the output Path and public Path keys? |
Same error here, impossible to understand why |
Waiting for the fix : Instead of:
What I did :
It's kind of tricky, but it's actually works |
I also experience the same issue |
Same issue, but this worked: Directory structure is:
In my css, the path gets set to |
so my issue was more that the url is different from the directory structure. Im lucky that the only difference was the 2 underscores.. If someone has a site where the url is completely different from the directory structure this would be a big issue as here is my fix |
Same error here, impossible to understand why too |
i was having this same issue. however while scouring the internet i came across this: that entails:
What i dont understand is why isnt this on webpack's file-loader Git page? FYI: im still new to Github |
I have same error in 0.11.2, but version 0.10.0 works fine |
thanks @dirago your temporary solution works great. waiting for the fix too! |
Same issue here. Downgraded to 0.10.1 and the issue is gone. |
I wonder if this is related, but it seems that I have an absolute path set on |
I've been searching for a solution for a while. I couldn't get webpack to get the correct path to my images in my '*.css' file. The solution using "publicPath: function(url ..... " works great for me. My file structure is:
base.scss looking like this:
test.scss looking like this:
My webpack.config.js is:
I discovered both following solutions to my images path work: solution with a publicPath function:
solution with ouputPath and publicPath:
I hope this extra info is helpfull |
Done in #246 |
@dirago thanX !!! resolve this issue! |
@dirago, thanks a lot! |
@dirago Thank you very much, solved my problem. |
Worked great! |
I have set up file loader for fonts however its not working as I thought it would.
my output path is completely different from my public path so I thought by declaring the locations in parameters this would work. e.g.
the SRC the css should be using is __fonts/name.ext and the files location should be in /fonts/name.ext
but this is not what is happening.
instead im getting
src: url(__fonts/fonts/font-name.ttf);
The text was updated successfully, but these errors were encountered: