With webpack 1 and ES6, and I cannot replace auth0-angular with angular-auth0.
Previously, my auth0 module looked like this:
import * as angular from 'angular';
import 'auth0-js';
import auth0 from 'auth0-angular';
export default angular.module('authZero', [
auth0
]).name;
In webpack, I used to the ProvidePlugin to make Auth0 globally available on the window object:
new webpack.ProvidePlugin({
'window.Auth0': 'auth0-js'
})
With angular-auth0, depending on my configuration, I get a variety of errors. I compared angular-auth0 with auth0-angular to see why one worked with webpack module bundling & the other did not. I suspect that the difference is that auth0-angularuses node's standard module.exports syntax:
Could angular-auth0 be changed to add compatibility standard node module bundling tools, such as webpack? I could put in a PR for this if you think it worthwhile.
With webpack 1 and ES6, and I cannot replace
auth0-angular
withangular-auth0
.Previously, my auth0 module looked like this:
In webpack, I used to the
ProvidePlugin
to makeAuth0
globally available on thewindow
object:With
angular-auth0
, depending on my configuration, I get a variety of errors. I comparedangular-auth0
withauth0-angular
to see why one worked with webpack module bundling & the other did not. I suspect that the difference is thatauth0-angular
usesnode
's standardmodule.exports
syntax:Could
angular-auth0
be changed to add compatibility standard node module bundling tools, such as webpack? I could put in a PR for this if you think it worthwhile.