// rules 里面
{
test: /\.vue$/,
use: ["happypack/loader?id=vue"],
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
},
// plugins 里面
new HappyPack({
// 用唯一的标识符 id 来代表当前的 HappyPack 是用来处理一类特定的文件
id: "vue",
// 如何处理 .js 文件,用法和 Loader 配置中一样
loaders: [{
loader: "vue-loader",
options: {
transformAssetUrls: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
}
}],
//共享进程池
threadPool: happyThreadPool,
//允许 HappyPack 输出日志
verbose: true,
})
但是最终报错:No matching use for vue-loader is found.
Make sure the rule matching .vue files include vue-loader in its use.
请问应该怎么配置呢?happypack 适用于哪些 loader 使用呢?