Skip to content
This repository has been archived by the owner on Jun 3, 2019. It is now read-only.

Can webpack config be patched to allow css urls #176

Closed
cyberwombat opened this issue Nov 10, 2016 · 4 comments
Closed

Can webpack config be patched to allow css urls #176

cyberwombat opened this issue Nov 10, 2016 · 4 comments

Comments

@cyberwombat
Copy link

Please see this thread webpack-contrib/style-loader#96

The gist of the issue is that when source maps are enabled its not possible to do

background: url('/my/img.jpg')

as URLs are relative to dev server. When I turn off source maps it works as people have also experienced.

At the end of the thread is a potential suggestion but it requires no publicPath to be set. I bring this to your attention in case it's an obvious fix for you.

@strues
Copy link
Collaborator

strues commented Nov 10, 2016

As far as I know (and I could very well be mistaken) public path is required for SSR usage. The public path needs to be there and absolute (http://localhost:3000/client/) so that Webpack is able to serve the files during development.

@cyberwombat
Copy link
Author

Ok. So this is a Chrome only issue. My attempts at using resolve-url-loader so far have not succeeded.

@ctrlplusb
Copy link
Owner

Thanks for the report @cyberwombat

I am almost certain I have done something similar and have not experienced the same issue, but let me try this out again. It's helpful to have that issue link thanks.

@ctrlplusb
Copy link
Owner

@cyberwombat I think there was a bug in the public URL config previously. I am closing this.

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

No branches or pull requests

3 participants