huacnlee / social-share-button

Helper for add social share feature in your Rails app. Twitter, Facebook, Weibo, Douban ...
MIT License
582 stars 309 forks source link

Add support for webpacker #191

Open do-you-dare opened 4 years ago

do-you-dare commented 4 years ago

Rails 6 uses webpack by default, and it seems that social-share-button doesn't support it yet. I seems to involve adding a package.json and publishing the project on npm. An example can be found here: https://github.com/ifad/data-confirm-modal/pull/53, found on this webpacker issue: https://github.com/rails/webpacker/issues/57.

Do you plan to support installing with webpacker?

martintsan commented 4 years ago

189 https://github.com/huacnlee/social-share-button/issues/189#issuecomment-635206871

kwent commented 3 years ago

Way too hacky. Should not require coffee-loader, should not require('some_erb_file.erb') and so on.

Js should be compiled and ready to be imported as require("social-share-button") directly.