How to write a file to the public of the generated project through the plug-in of Vue CLI

write a third-party plug-in for Vue CLI 3 and ask myOwnPlugin, to use it through vue create-- preset myOwnPlugin/vue-cli-plugin-myOwnPlugin my-project.
how to write files to the public of the generated project through this plug-in.


create a new template folder under the generator folder.
create a new public folder under the template file. The
public folder places preset files.
write api.render ('. / template', options)) to index.js under the generator folder.
(where template can be changed to any name)

Menu