hauleth / vanilla-ujs

UJS without jQuery dependency
MIT License
194 stars 24 forks source link

Vanilla UJS as ES6 modules #36

Open sakamies opened 6 years ago

sakamies commented 6 years ago

I needed to include Vanilla UJS via webpack in our product and couldn't figure out how to stop webpack tree shaking it all away, so I converted Vanilla UJS to use module syntax and have an init method when it's imported.

Might bee too big of a change for a pull request and I needed it pretty quick, so I made a fork and an npm module. (https://github.com/sakamies/modular-ujs)

Is this something you'd want to integrate to this repo?

gavinsmith commented 6 years ago

@sakamies thanks for doing that, and yes, this is a thing I need too.