You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we found a problem with unplugin, we discussed whether it was a problem or not, that is, in vuecli, although the code in transform in the plug-in was executed, it didn't take effect, as if it had been repeated and the returned code was completely useless.You need to write extra hooks to make it run.
@antfu Because I have the same plug-in, there is such a need to convert something. Like this, it is not enough for that plug-in to write code in tranform at the pre stage. There is no problem in vite environment, but there is something wrong with webpack. Is it in conflict with other default plug-ins in vuecli? Therefore, a discussion was held. Please forgive me.
#287 Here's the code. Last time, the problem of error reporting was solved. This time, the problem was that transform didn't take effect in webpack, so extra code had to be added to solve it. It is possible in vite environment, so I want to know whether transform will fail in webpack environment.The above code is a new webpack.The unique hook was solved.
Or you can clone gitee gitee code, download the zip and run it as a local plug-in, and add transforminclude to the zip! id.endwith('.html') Let it not report an error
Activity
wojiaoxiaomayun commentedon Mar 22, 2023
like this
wojiaoxiaomayun commentedon Mar 22, 2023
@antfu Because I have the same plug-in, there is such a need to convert something. Like this, it is not enough for that plug-in to write code in tranform at the pre stage. There is no problem in vite environment, but there is something wrong with webpack. Is it in conflict with other default plug-ins in vuecli? Therefore, a discussion was held. Please forgive me.
sxzz commentedon Mar 22, 2023
We temporarily close this due to the lack of enough information. Please provide a minimal reproduction to reopen the issue. Thanks.
https://antfu.me/posts/why-reproductions-are-required
Please provide a full reproduction repository, instead of a few lines of code.
wojiaoxiaomayun commentedon Mar 22, 2023
#287 Here's the code. Last time, the problem of error reporting was solved. This time, the problem was that transform didn't take effect in webpack, so extra code had to be added to solve it. It is possible in vite environment, so I want to know whether transform will fail in webpack environment.The above code is a new webpack.The unique hook was solved.
wojiaoxiaomayun commentedon Mar 22, 2023
@sxzz I will provide you with a more detailed example tomorrow morning. Please close it first.
wojiaoxiaomayun commentedon Mar 22, 2023
Or you can clone gitee gitee code, download the zip and run it as a local plug-in, and add transforminclude to the zip! id.endwith('.html') Let it not report an error
wojiaoxiaomayun commentedon Mar 23, 2023
@sxzz test code this is demo,please read readme.md,thanks for you.
wojiaoxiaomayun commentedon Mar 25, 2023
Is this a bug?