Update to Vue CLI 3
TheJaredWilcurt opened this issue · comments
The instructions are for Vue CLI 2. There are a lot of benefits to switching over to CLI 3, especially the reduction in dependencies.
I didn't find any useful resource for this, electron-vue
also uses Vue CLI 2.
I have created:
It uses Vue-CLI 3. I could use some help getting testing working with NW.js though
@TheJaredWilcurt We have also a background script, so delivering all webpack job to @vue/cli
is not a good job.
In this boilerplate, We only use @vue/cli
to download the repository and create a project using it.
In nw-vue-cli-example
there is a simpler approach. Vue's default webpack dev server (vue-cli-service serve
) is ran and NW.js is launched at the same time and pointed to the localhost that webpack is serving. The node-remote
is pointed there too, so it works as you'd expect for development. node-main
is not used during development, so it is free if the user needs it.
When you do a build with vue-cli-service build
it outputs static files, but they still have all their src="/
references, expecting to be at the root of a server. So the built version uses a simple node-main
script to start a static web server to serve the built files. So the main
and node-remote
are pointed at the static webserver's localhost.
You should try it out!