-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
According to the README, webpacker compiles on demand in the development environment:
In development, Webpacker compiles on demand rather than upfront by default. This happens when you refer to any of the pack assets using the Webpacker helper methods. That means you don't have to run any separate process. Compilation errors are logged to the standard Rails log.
In a new Rails 5.1.3 application generated with --webpack and with the following modifications:
app/views/layouts/application.html.erb
<%= javascript_pack_tag 'application' %>
config/routes.rb
root to: 'application#index'
app/views/application/index.html
Empty file
...I get the following error:
Webpacker::FileLoader::NotFoundError in Application#index
Can't find application.js in ~/rails513-webpack/public/packs/manifest.json. Is webpack still compiling?
After a manual invocation of "bin/rake webpacker:compile", the application.js pack loads without error but fails to update on-demand when app/javascript/packs/application.js is modified, as the documentation above would indicate it should.
(Tested on rails master - 5.2.0.alpha just now; same behavior. Also probably a duplicate of #671.)