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

Universal (//domain.com/asset.css) publicPath and ExtractTextPlugin: css is missing #205

Closed
smolyakoff opened this issue Feb 3, 2016 · 3 comments

Comments

@smolyakoff
Copy link

In my webpack configuration I have a public path configured in such a way that it is not dependent on HTTP/HTTPS server

{
   output: {
      publicPath: '//localhost:8080/'
   }
}

The output chunk names look like this:

[ '//localhost:8080/vendor-3a8b12e879b7905f4358.js',
  '//localhost:8080/vendor-3a8b12e879b7905f4358.js.map' ]
[ '//localhost:8080/app-3a8b12e879b7905f4358.js',
  '//localhost:8080/styles.css',
  '//localhost:8080/app-3a8b12e879b7905f4358.js.map',
  '//localhost:8080/styles.css.map' ]

CSS is not inserted into the output HTML, probably because path.extname() is used to get an .css extension

Can we add a special check to cover this case?

@jantimon
Copy link
Owner

jantimon commented Feb 3, 2016

In webpack you should always specify http or https in your public path during development as it will break background images in css files if you use source maps.
But feel free to create pull request for this issue 👍

@smolyakoff
Copy link
Author

@jantimon Thanks for you notice, haven't faced background images yet. This could still be useful when building a package for deployment, urls should work in this case (i'm using extract text plugin).

I've created a pull request, could you take a look?

@lock
Copy link

lock bot commented Jun 1, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants