What should I do after developing a Vue app with vue-cli
?
In Angular there was some command that bundle all the scripts into one single script, and then these files are sent to host.
Is there something the same in Vue?
What should I do after developing a Vue app with vue-cli
?
In Angular there was some command that bundle all the scripts into one single script, and then these files are sent to host.
Is there something the same in Vue?
If you run into problems with your path, maybe you need to change the
assetPublicPath
in yourconfig/index.js
file to your sub-directory:http://vuejs-templates.github.io/webpack/backend.html
in your terminal
and you host the dist folder. for more see this video
npm run build - this will uglify and minify the codes
save index.html and dist folder in root directory of your website.
free hosting service that you might be interested in -- Firebase hosting.
I think you've created your project like this:
Well, now you can run
Copy index.html and /dist/ folder into your website root directory. Done.
If you've created your project using:
You'd need to set your
NODE_ENV
to production and run, because the project has web pack configured for both development and production:Copy
dist/
directory into your website root directory.If you're deploying with Docker, you'd need an express server, serving the
dist/
directory.Dockerfile
This command is for start the development server :
Where this command is for the production build :
Make sure to look and go inside the generated folder called 'dist'.
Then start push all those files to your server.