Open Leesson opened 4 years ago
👍 Looking forward to this landing. I find it odd that the docs suggest to do this in JS https://cli.vuejs.org/dev-guide/plugin-dev.html#changing-main-file
Is it that there are two ways (one being broken) and the other way is just complicated?
@steveworkman Some plugins need to modify files conditionally such as vue-cli-plugin-vue-next
, so it should do like change-main-file
in official doc. Else extend template
is not powerful, it is usually used to create file when init a new project.
Version
4.5.7
Reproduction link
https://github.com/Leesson/vue-cli-preset-sim
Environment info
Steps to reproduce
create a project with this preset:
and then there will be an error "Error: Cannot find module '@vue/cli-service/generator/template/public/index.html' from '/private/var/folders/.../vue-cli-presets/vue-cli-preset-sim/generator/template/public'"
It seems the cli should install dependencies after clone the preset repo to local. you can clone this repo to local, install it, and run the code below:
then you can get the right result
What is expected?
create project
What is actually happening?
throw an error