angular-simple-logger icon indicating copy to clipboard operation
angular-simple-logger copied to clipboard

Make importable with webpack 2

Open christiaanwesterbeek opened this issue 8 years ago • 3 comments

With Webpack 2 and Angular 1.x with this

import angularSimpleLogger from 'angular-simple-logger'

angular.module('app', [angularSimpleLogger])

Is throwing this angular error when it spins up

app.bundle.js:55447 Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module {} due to:
Error: [ng:areq] Argument 'module' is not a function, got Object
http://errors.angularjs.org/1.5.9/ng/areq?p0=module&p1=not%20a%20function%2C%20got%20Object

I'm not sure why, but the change in this PR fixes that. Not sure if it introduces other problems.

christiaanwesterbeek avatar May 17 '17 11:05 christiaanwesterbeek

Can you update the Travis issues? First try updating mode and some of the dependencies. I will merge this if we can get this to pass.

nmccready avatar Jul 22 '17 02:07 nmccready

I'm sorry @nmccready , but that will take me too much time considering my agenda. If nobody is interested in fixing the Travis issues and it doesn't get merged, I'll understand and I will use a local wrapper in that case so to fix the webpack importability.

christiaanwesterbeek avatar Jul 22 '17 19:07 christiaanwesterbeek

Ok when I get a chance I'll merge it locally and attempt to fix Travis.

On Sat, Jul 22, 2017 at 15:01 Christiaan Westerbeek < [email protected]> wrote:

I'm sorry @nmccready https://github.com/nmccready , but that will take me to much time considering my agenda. If nobody is interested in fixing the Travis issues and it doesn't get merged, I'll understand and I will use a local wrapper in that case so to fix the webpack importability.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/nmccready/angular-simple-logger/pull/23#issuecomment-317203640, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjnqdQsYWrw26-WtV7TFAjeWjGGMH9Aks5sQkcPgaJpZM4NduD- .

--

Nicholas McCready

Personal Email: [email protected] Web site: http://github.com/nmccready Twitter: nmccready

nmccready avatar Jul 22 '17 21:07 nmccready