webpack-assets icon indicating copy to clipboard operation
webpack-assets copied to clipboard

Weird URL logic

Open einzige opened this issue 7 years ago • 0 comments

Let's say I have the following configuration:

Webpack.configure do |config|
  if Rails.env.production?
    config.cdn_host = "mycdn.com"
    config.use_server = false
    # ...
  else
    # ...
  end
end

In the views I have

= webpack_js_tag 'index'

The generated HTML will contain relative path <script src="/assets/index.css"> Expected host to be used: <script src="//mycnd.com/index.css">

  1. Copying the same CDN in the rails assets configuration doesn't make sense
  2. If you think it makes sense, then expected cdn_host option to be named differently: only_static_files_cdn_host

einzige avatar Jun 18 '17 08:06 einzige