Skip to content

Instantly share code, notes, and snippets.

@akre54
Last active October 27, 2015 13:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akre54/d7ebd8893128e4bf9235 to your computer and use it in GitHub Desktop.
Save akre54/d7ebd8893128e4bf9235 to your computer and use it in GitHub Desktop.
Backbone deps test
node_modules
out.js*
var Backbone = require('backbone');
console.log(new Backbone.View);
{
"name": "dep-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Adam Krebs <amk528@cs.nyu.edu> (http://sberkmada.com/)",
"license": "MIT",
"dependencies": {
"backbone": "1.2.0",
"zepto": "0.0.4"
},
"devDependencies": {
"exports-loader": "^0.6.2",
"webpack": "^1.9.11"
}
}
var webpack = require('webpack');
var webpackConfig = module.exports = {
devtool: 'source-map',
debug: true,
watch: true,
entry: {
out: __dirname + '/index'
},
output: {
path: __dirname,
filename: '[name].js'
},
module: {
loaders: [
{ test: /zepto(\.min)?\.js$/, loader: "exports?Zepto; delete window.$; delete window.Zepto;" }
]
},
resolve: {
alias: {
jquery$: "zepto/zepto.min.js"
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment