angular-bacon
angular-bacon copied to clipboard
Use umd wrapper
Can you please use umd wrapper and publish the module to npm?
Published. UMD wrapper is a bit problematic though - even though Angular team started to publish their releases to npm, they don't export Angular as a CommonJS module yet. Angular will therefore always require some amount of shimming depending on which bundler you're using.
If you have a straightforward solution to this, I'd love to see it! Otherwise I'm going to close this issue for now, and revisit it once Angular supports CommonJS better.
Angular will therefore always require some amount of shimming depending on which bundler you're using.
Yes, that's a common problem. There is angular-cjs
shim for cjs modules, and shimming is pretty straightforward with AMD.
Otherwise I'm going to close this issue for now, and revisit it once Angular supports CommonJS better.
I am skeptical about this, as they have some issues with merging AMD-related pull requests for a long time.
Anyway, I am using both CJS/AMD modules and UMD will be much helpful.
I need this thing as I am planning to use angular-bacon with my "framework" based on angular (from now on). I will either use requirejs or webpack (which supports AMD/cjs/es6 modules) as a opinionated module loader for those stuff.
Sure, I think I'm going to do a proof of concept sometime next week to explore some options on how that might work with Browserify, RequireJS and Webpack.
If you need the setup for angular, you can see it here:
- w webpack: https://github.com/packetloop/angular-webpack
- w requirejs: https://github.com/tnajdek/angular-requirejs-seed/blob/master/app/js/main.js