-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
26 lines (24 loc) · 866 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var loaderUtils = require("loader-utils"),
sibilant = require("sibilant");
var sibilantWebpackLoader = (function sibilantWebpackLoader$(source) {
/* sibilant-webpack-loader index.sibilant:3:0 */
var loader = this;
loader.cacheable();
var sibilantRequest = loaderUtils.getRemainingRequest(loader),
jsRequest = loaderUtils.getCurrentRequest(loader),
query = loaderUtils.parseQuery(loader.query),
result = sibilant({
file: sibilantRequest,
map: true
}),
js = result.js,
dependencies = result.dependencies,
map = result.map;
console.log(("" + sibilantRequest + ": " + dependencies.join(", ")));
dependencies.map((function() {
/* index.sibilant:13:23 */
return loader.addDependency(arguments[0]);
}));
return loader.callback(null, js, map.toJSON());
});
module.exports = sibilantWebpackLoader;