webpack/test/browsertest/node_modules/testloader/lib/loader.webpack-loader.js

7 lines
252 B
JavaScript
Raw Normal View History

2012-03-27 06:00:32 +08:00
module.exports = function(contents, options, callback) {
var content = contents[0];
callback(null, "module.exports=" + stringify(content+"webpack"));
}
function stringify(str) {
return '"' + str.replace(/\\/g, "\\\\").replace(/\"/g, "\\\"") + '"';
}