rails-assets
rails-assets copied to clipboard
issues with mozilla--pdf.js
https://rails-assets.org/#/components/mozilla--pdf.js
docs say:
//= require mozilla--pdf.js
//= require jquery
//= require jquery_ujs
//= require turbolinks
However this did not work, by digging through the gem. I had to do:
//= require pdf.js.js
//= require jquery
//= require jquery_ujs
//= require turbolinks
Also I have come across issues post requiring this
(Uncaught ReferenceError: require is not defined
).
I believe this gem needs built with the prebuilt 'pdfjs-dist' https://github.com/mozilla/pdf.js#using-pdfjs-in-a-web-application.