-
-
Save logzh/1544160b1f6f0b4bb37b69b3f03d035b to your computer and use it in GitHub Desktop.
webpack处理zepto
This file contains 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