dekimasoon / vue-cli-plugin-cordova

This repository is deprecated. Please check https://github.com/m0dch3n/vue-cli-plugin-cordova
MIT License
38 stars 14 forks source link

How does the config symlink work? #20

Closed chasebank closed 6 years ago

chasebank commented 6 years ago

I'm having difficulty getting cordova-plugin-file working, and while investigating I noticed that I have a main config in the root directory, and a symlink in public.

Admittedly I'm not experienced with symlinks, but I'd expect there to be no difference between the two files, since they are in fact the same?

However when I open the config in public, it does not match the config in root. Newly installed plugins and configurations are only added to the root config, and do not show in the public one.

Is this the expected behavior?

dekimasoon commented 6 years ago

I have made a sample repository about a month ago. https://github.com/dekimasoon/vue-cli-plugin-cordova/issues/18#issuecomment-397941997

As you can see, config.xml symlink in public dir is not link for root config.xml. It points to ../platforms/browser/www/config.xml which is config.xml for browser platform. https://github.com/dekimasoon/vue-cordova-file-plugin-sample/blob/master/public/config.xml

Your problem seems to have occurred because ./platforms/browser/www/config.xml is not updated somehow. I assume that on Windows we need to excute $cordova build browser after installing cordova plugins to update ./platforms/browser/www/config.xml.

Hope it helps you.

dekimasoon commented 6 years ago

@chasebank any updates? Please let me know.

chasebank commented 6 years ago

Yeah, sorry about that. Thanks for the plugin-file example! Things seem to be working as expected, and this was more of a support inquiry, so I'll go ahead and close it.

I have another question though: What's your recommended workflow for cloning an existing project that was created using this?

For a new project, you'd run vue add cordova, but you obviously don't want to run that on an existing project.

I noticed that you're .gitignoring

/www
/platforms
/plugins

but not /public

Right now I think I ran cordova platform add ... to re-add each of the platforms, but not sure if there's a better way.