Created
December 1, 2014 20:58
-
-
Save aermolaev/ce5995e43d626a3e665f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Load Zepto as module */ | |
module.exports = { | |
entry: "./app.js", | |
output: { | |
path: __dirname, | |
filename: "bundle.js" | |
}, | |
module: { | |
loaders: [ | |
{ test: /zepto(\.min)?\.js$/, loader: "exports?Zepto; delete window.$; delete window.Zepto;" }, | |
] | |
}, | |
resolve: { | |
alias: { | |
"zepto": "zepto/zepto.min.js", // var $ = require('zepto') | |
// "$$": "zepto/zepto.min.js", // var $ = require('$') | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is super helpful; thanks! N.b., I had to remove the line in module.loaders to make this work with
ts-loader
!