Skip to content

Instantly share code, notes, and snippets.

@yannickcr
Created September 5, 2014 11:29
Show Gist options
  • Save yannickcr/959dadb31965078dd57f to your computer and use it in GitHub Desktop.
Save yannickcr/959dadb31965078dd57f to your computer and use it in GitHub Desktop.
jQuery 1.9.1 + Browserify

jQuery 1.9.1 + Browserify

Install jQuery 1.9.1 and Browserify-shim

npm install jquery@1.9.1 --save
npm install browserify-shim --save-dev

Add the following entries in your package.json

  "browserify": {
    "transform": [ "browserify-shim" ]
  },
  "browser": {
    "jquery": "./node_modules/jquery/jquery.js"
  },
  "browserify-shim": {
    "jquery": "$"
  }

And then require jquery in your files.

var $ = require('jquery');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment