nikushi / minipack

Minipack, a gem for minimalists, which can integrates Rails with webpack. It is an alternative to Webpacker.
MIT License
115 stars 22 forks source link

Support reading manifest.json from an uri #4

Closed nikushi closed 5 years ago

nikushi commented 5 years ago

This enables the gem to read remote manifest.json which is served via HTTP. An example configuration is as below:

WebpackManifest::Rails.configuration do |c|
  ...
  c.manifest = 'http://localhost:8080/packs/manifest.json'
  ...
end

The background of this enhancement is to supporting Hot Module Replacement by webpack-dev-server. manifest.json is served via HTTP, not from file system, by webpack-dev-server. Therefore, this should be useful.