Sha256: af6e93f16116fb21c6b022d59e096dd5d6709722b69fc431126e73c7907a7f1a
Contents?: true
Size: 698 Bytes
Versions: 28
Compression:
Stored size: 698 Bytes
Contents
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const JsonParser = require("./JsonParser"); const JsonGenerator = require("./JsonGenerator"); class JsonModulesPlugin { apply(compiler) { compiler.hooks.compilation.tap( "JsonModulesPlugin", (compilation, { normalModuleFactory }) => { normalModuleFactory.hooks.createParser .for("json") .tap("JsonModulesPlugin", () => { return new JsonParser(); }); normalModuleFactory.hooks.createGenerator .for("json") .tap("JsonModulesPlugin", () => { return new JsonGenerator(); }); } ); } } module.exports = JsonModulesPlugin;
Version data entries
28 entries across 27 versions & 9 rubygems