You should all read the Usage section of the webpacker docs.
https://github.com/rails/webpacker#usage NOTE: We ARE using the split chunks API.
<%= stylesheet_packs_with_chunks_tag 'my_stylesheet' %>
<%= javascript_packs_with_chunks_tag 'my_js_file', 'my_other_js_file' %>
<%= stylesheet_pack_tag 'my_js_file' %>
<%= javascript_pack_tag 'my_js_file' %>
<%= javascript_pack_tag 'my_other_js_file' %>
Make sure that you don't have more than one reference to javascript_packs_with_chunks_tag
in your templates.
You may need to update node so try this which will autoload the version in our current .rvmrc file (today that's 8.9.4).
Assuming you have nvm
installed (you probably should), run these commands to confirm that you are on the correct version of node
and have re-compiled things.
$ nvm install
$ nvm use
$ ./install.sh