1

I am "requiring" Malsups Cycle2 library into a project which depends on jQuery however, I want to exclude jQuery from being bundled as I will be including this separately.

Currently my package.json has:

  ...
  "dependencies": {
    "browserify-shim": "^3.8.12",
    "font-awesome": "^4.6.3"
  },
  "browserify-shim": {
    "jquery" : "global:jquery"
  }....

My gruntfile.js has this:

  ...
  browserify: {
        dist: {
            files: {
                "dest.js" : "source.js"
            },
            options: {
                transform: ["browserify-shim"]
            }
        },
    }...

And in my JS file I simply have:

var cycle2 = require("jquery.cycle2");

However jQuery is still being bundled.

Zakalwe
  • 1,444
  • 3
  • 14
  • 25

0 Answers0