alkali icon indicating copy to clipboard operation
alkali copied to clipboard

Native ES6 Module Support

Open foundling opened this issue 7 years ago • 3 comments

Hey Kris, are you open to a PR augmenting the way alkali is packaged to include native ES6 module support?

foundling avatar Sep 15 '18 02:09 foundling

Yes, that sounds great. How would we go about doing this? Would it mean generating a .mjs file in the build? If that could provides native module support, that would be awesome.

kriszyp avatar Sep 15 '18 13:09 kriszyp

My original thought was that it would be really nice to able to use the type="module attribute on the script tag to access alkali as a module without build tools. Supporting Node is equally important of course, but more complicated, so I'll do some research to figure out what the best approach would be to support both.

foundling avatar Sep 15 '18 20:09 foundling

I wonder if switching to Rollup might offer better support for building ES6 modules as output?

kriszyp avatar Sep 15 '18 21:09 kriszyp