I’m trying to use the epubjs
library with rails (using importmaps), but I’m getting this error. And I don’t know if I’m doing something wrong or this package is somehow incompatible with importmaps.
This is the error I’m getting:
Those js files are getting 404.
The app setup is super basic. I just did:
- rails new epubjs
- bin/rails g controller home page
- bin/importmap pin epubjs - which pin some dependencies to
vendor
and other to thecdn
. - Added root pointing to
home#page
- Added a import for
epubjs
onapp/javascript/controllers/hello_controller.js
file.
(I setup a repro here: GitHub - dimas-cyriaco/rails_epubjs)
Then, when acessing the home page, I get this errors.
I’m thinking maybe I have to use a bundler to use epubjs
? I would like to avoid using a bundler…