tenex / rails-assets

The solution to assets management in Rails
https://rails-assets.org
MIT License
1.63k stars 69 forks source link

issues with mozilla--pdf.js #449

Open ChrisCPO opened 5 years ago

ChrisCPO commented 5 years ago

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.