草庐IT

childCompiler

全部标签

javascript - 在 webpack 插件中使用加载器

为了澄清-这是一个关于写webpackplugin的问题如何在webpack插件中使用webpackrequire?MyPlugin.prototype.apply=function(compiler){varself=this;compiler.plugin('emit',function(compilation,callback){varfile='example.css';compilation.fileDependencies.push(file);varloaderResult=require('style!css!'+file);// 最佳答案