javascript - Converting a jQuery plugin to an es6 module -


evening all,

is there simple way convert existing jquery plugin use es6 import/export syntax.

for example:

import $ 'jquery'; import cycle 'plugins/jquery-cycle'; 

thanks

i tried solutions thread jquery plugin(autocomplete), , works. although have manually change umd js file es6-ish module. if third part libraries complicated or there many of them, don't think approach gonna work well.

that being said, can give other tools shot depends on structure of project. example, use jspm , systemjs thread mentioned. or use amd-to-es6 convert file format(although plugin doesn't seem work umd js file now). if using rollup bundle es6 files, can add rollup plugin in rollup config(but still have issue umd files).


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -