Open BuugMakerr opened 10 months ago
(我zz了,好像可以说中文O.O)
我尝试了以下几种方法,但是都没有输出时间信息:
1.
在vue.config.js中:
const { TimeAnalyticsPlugin } = require("time-analytics-webpack-plugin");
module.exports = TimeAnalyticsPlugin.wrap({...});
2.
直接修改build/index.js源码:
const { TimeAnalyticsPlugin } = require('time-analytics-webpack-plugin');
const webpackConig = TimeAnalyticsPlugin.wrap(webpackConfig);
return new Promise((resolve, reject) => {
webpack(webpackConfig, (err, stats) => {
...
})
})
这两种方法都不生效
抱歉,我从来没用过Vue。。 这个plugin的工作原理是接管plugin和loader,在它们执行前后记录时间。 为此,我们需要包裹本来需要使用的webpack config,从而允许我们做些注入和修改
在你提供的例子里看上去确实包裹了。。 如果可能的话,能提供一个能重现这个问题的repo吗
Thank you for providing this plugin. If I want to configure this plugin in my Vue2 project based on Vue cli3, that is, in vue.config.js, what should I do, especially when both configureWebpack and chainWebpack exist