Closed robjlucas closed 2 months ago
On further investigation I increasingly suspect this is something to do with ES6, but still don't have a solution.
This issue has been mentioned on Foundation Open Source Community. There might be relevant details there:
https://foundation.discourse.group/t/foundation-with-rails-and-sprockets-4/2692/1
It looks like it misses some file extension. Can you provide a reproducible testcase as repository with the needed steps to run it?
It looks like it misses some file extension. Can you provide a reproducible testcase as repository with the needed steps to run it?
Thanks @DanielRuf. It'll take me a few days at least, but I'll do my best to do that asap.
The problem seems to be that the .js.es6
file extensions used in this gem are not recognized by Sprockets. You can work around this error by creating an initializer: config/initializers/foundation-rails.rb
with the following contents:
Sprockets.register_mime_type 'application/ecmascript-6', extensions: ['.es6', '.js.es6'], charset: :unicode
foundation-rails 6.3.1.0 breaks after upgrading Rails from 5.2.4.1 to 5.2.4.3, unable to find the main Foundation js file. Specifically, it is the upgrade of sprockets from 3.7.2 to 4.0.0 that causes this to break.
I'm sure it's something simple I'm missing, but several hours of searching and fiddling haven't brought it to light. There are various significant changes with the new version of Sprockets; though I don't see the immediate cause as yet.
app/assets/javascripts/application.js
requires foundation as before, and as specified in the docs:app/assets/config/manifest.js
: