-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
vue-cli-4 breaks disambiguation of file name #4636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is it because in Vue CLI 4 the directory structure changed to |
You are absolutely right, @sodatea. So I guess this is a request for a upgrade guide for plugin authors :-D Also I found out now, from that PR, that |
Yeah, definitely need to document it. The legacy preset options are still supported, though. |
Where would these Sections need to be documented in the Repository? |
Added the changelog here. But I'm not sure if we should document the generator directory structure like other public APIs. |
Added in the documentation. |
Version
4.0.0-rc.6
Environment info
Steps to reproduce
Install a vue-cli preset, which (installs a vue-cli plugin that / itself) detects whether it needs to modify
router.js
orrouter.ts
in the following way:What is expected?
The correct file is targeted.
What is actually happening?
An error is thrown:
This, in my experience, means that
routerFile
does not exist (in the file system or the vue-cli working buffer respectively).In vue-cli-3 the typescript plugin moved
router.js
torouter.ts
in a post-processing step. So when applyingtransformScript
on that file in a preset, it needed to targetrouter.js
. If the transformation is applied later, e.g. withvue invoke
after the typescript plugin was already added, it needed to targetrouter.ts
.The above disambiguation works for vue-cli@^3.9, but not for vue-cli@4.0.0-rc6
The text was updated successfully, but these errors were encountered: