aurelia / dialog

A dialog plugin for Aurelia.
MIT License
106 stars 115 forks source link

fix(build): adjust umd build, add umd-es2015 #369

Closed bigopon closed 5 years ago

bigopon commented 5 years ago

@fkleuver @huochunpeng @EisenbergEffect @StrahilKazlachev

This PR adds an additional build target: umd-es2015 for the combination of umd module format and es2015 version. Also adjust package.json so it won't cause any issues with IE11 when used without transpilation by pointing module field in package.json to native-modules

EisenbergEffect commented 5 years ago

@bigopon Does this replace #368 ?

3cp commented 5 years ago

I think so.

3cp commented 5 years ago

@bigopon this closes aurelia/cli#1033

bigopon commented 5 years ago

Yes. It supersedes the other PR from Chunpeng. Also after this we just need to copy it to other offici plugins

EisenbergEffect commented 5 years ago

@bigopon To be clear, this would address the issue we had with broken builds due to different needs of aurelia-script vs. other consumers, or is that something different? (Forgive me if I'm crossing things in my mind.)

bigopon commented 5 years ago

Yes. The main way we have promoting aurelia script so far is to use umd build, so we need one for aurelia script, hence the commit adding UMD build and few package.json fields that unfortunately broke folks apps that have to support IE11. The simple fix was to change the ES version to ES5 from Es2015 in umd build. However, this punishes aurelia script users as transplantation process adds a bit of bloat to the final bundle, so i introduced umd-es2015 and point unpkg field to that, with the hope that we van support aurelia script better. The same fix should be applied for other official plugins.

EisenbergEffect commented 5 years ago

@bigopon That's what I though. Thank you for the confirmation. I've merged this now, so please ping me on PRs to address this in other relevant locations. Thanks!