Skip to content

Instantly share code, notes, and snippets.

View karlfloersch's full-sized avatar
🐹
dogeeeeee

Karl Floersch karlfloersch

🐹
dogeeeeee
View GitHub Profile
@karlfloersch
karlfloersch / index.js
Created April 4, 2016 18:35 — forked from mogelbrod/index.js
Simple apply-loader module for webpack
var loaderUtils = require('loader-utils');
module.exports = function(source) {
this.cacheable && this.cacheable();
var query = loaderUtils.parseQuery(this.query);
var args = [];
// apply?config=key => sourceFn(require('webpack.config').key)
if (typeof query.config === 'string') {
if (!query.config in this.options)