-
-
Notifications
You must be signed in to change notification settings - Fork 256
publicPath backward compatibility issue in 0.11.1 #140
Comments
I can't use it in this state at all. ASP.Net uses a directory called options: {
name: '[name].[ext]',
publicPath: '/data/',
outputPath: 'wwwroot/dist/data/'
} This results in the following in my final CSS (the value I'm looking for is just foo {
src: url(/data/wwwroot/dist/data/icons.eot)
} The only viable workaround is to revert to 0.10.1 (thanks @wujekbogdan), getting these results from 0.11.1 seems completely impossible (I've tried using |
Looks like |
@wujekbogdan @jcdickinson Could someone try changing |
What do you mean, pattern? To me it seems that with 0.11.1 the public path (the thing that eventually gets appended to webpack_public_path) is always publicPath+outputPath+name (wrong) while with 0.10.1 it was publicPath+name (better*). Do you mean you found a case where the outputPath is not wrongly appended in 0.11.1? * I'm writing "better" because personally I would prefer to have the publicPath completely independent from the name that is logged and supporting the same placeholders. |
Yup I just encountered this bug too, took me a while to figure out what was going on. My code is as follows.
On 0.10.1 it works fine because the url is resolved to And using an absolute path as the publicPath doesn't fix it either
As @AndreKR stated above it seems like like |
@wujekbogdan Is the problem still there? Did comment #140 (comment) help your to solve problem? |
Right now |
I've just upgraded from 0.10.1 to 0.11.1
This is how one of my file-loader entries looked like before the upgrade.
./src/img/
directory./src/scss/app.scss
to./dist/css/app.css
./dist/img/
So URL in the CSS file must look like
url(../img/image-file.jpg)
Before the upgrade it was OK. But after upgrade, URLs started to look like
url(../img/img/image-file.jpg)
(notice the additional /img/).So I had to change the
publicPath
entry frompublicPath: '../img'
topublicPath: '../'
So now, my config looks like:
So, this is a breaking change, it should be either fixed or documented (if it's intentional).
webpack 2.3.2, macOS Sierra, node v7.7.2
The text was updated successfully, but these errors were encountered: