angular-fullpage.js icon indicating copy to clipboard operation
angular-fullpage.js copied to clipboard

Browserify + angular-fullpage.js

Open tonestrike opened this issue 7 years ago • 2 comments

I have an application that relies on Browserify. I am trying to add this module to my application but am having trouble. This is what my Package.JSON looks like:

"browser": {
    "fullpage": "./node_modules/fullpage.js/dist/fullpage.min.js",
    "angular-fullpage.js": "./node_modules/angular-fullpage.js/angular-fullpage.min.js"
},
"browserify-shim": {
    "fullpage.js": {
      "exports": "fullpage",
      "depends": "jquery"
    },
    "angular-fullpage.js": {
      "exports": "angular.module('fullPage.js').name",
      "depends": "fullpage.js"
    }
}

I require the module in the AngularJS application using

require('angular-fullpage.js')

When I run the application I get:

Failed to instantiate module portal due to:
Error: [$injector:modulerr] Failed to instantiate module {} due to:
Error: [ng:areq] Argument 'module' is not a function, got Object

Any ideas what is wrong with this?

tonestrike avatar Aug 14 '18 22:08 tonestrike

I'm only currently exporting the module as an angular directory.

hellsan631 avatar Aug 16 '18 17:08 hellsan631

So is the answer that there isn't a way to do this using Browserify?

tonestrike avatar Aug 16 '18 17:08 tonestrike