Usando um carregador dentro de um plugin webpack
Para esclarecimentos - esta é uma pergunta sobre como escrever umplugin do webpack
Como você usa o webpackrequire
dentro de um plugin webpack?
MyPlugin.prototype.apply = function(compiler) {
var self = this;
compiler.plugin('emit', function(compilation, callback) {
var file = 'example.css';
compilation.fileDependencies.push(file);
var loaderResult = require('style!css!' + file); // <-- is there any way to make this possible?
});
};