So in Vue.js app to make an app progressive you would run a command "vue add #vue/pwa" and it would add a "registerServiceWorker.js" file and after you would create a production build "npm run build" it would create a "dist" folder where the "manifest.json" file is stored. But in Vite Vue app when you are adding a pwa plugin, it adds the "registerServiceWorker.js" but it doesn't adds a file "manifest.json" inside of dist folder after creating product build.
So how can i fix this ??
Related
"require('../assets/img/avatar/'+img.url)" still working after Vue project build,why?
"dist" deploy on nginx do not have "assets" folder.
In local,use "npm run serve" to run vue project,my back-end application puts image in "assets/avatar" floder, then vue project "require('../assets/img/avatar/'+img.url)" to use it.
Now build Vue project and deploy on nginx,Where should application save my avatar image.
every time i build my nuxt project it creates a .nuxt folder and a dist folder in my root directory. what's the difference between them? i can run .nuxt by nuxt start command, but what's use of dist folder? i served it with a chrome extension and it worked fine. but i don't know what exactly it is. it's not a static version cause it's different from dist folder that nuxt generat command produce.it's fully interactive and when i run it by that extension i can't see any difference compare to runing .nuxt folder by nuxt start command.
I have a project with an existing webpack setup and it's unrelated to Vue.
Until now I have multiple entry points setups and some of these entry points are opening some iframes popups, and the plan is to build these iframes with VUE.
This means that I will also have multiple VUE entry points, this shouldn't be a problem but what I can't figure out is:
what is the best way to add VUE-cli into this already existing setup and use the same node_modules folder
Also to be able to add the vue-cli build commands to be run/triggered after my existing webpack build commands.
Let me know if more details are needed?
I've figure it out and it turn out that you can have both in the same project.
I've used vue create on my existing project folder and there is a prompt with a merge options.
Unfortunately it deleted my dependencies but was not such a big deal. Just had to reinstall them.
Now my project's webpack configuration remained completely separate form vue-cli which is handled by the vue.config.js and this is exactly what I wanted.
I am using something like this to build everything at once:
"build": "webpack --config webpack.prod.js && vue-cli-service build"
I am using vue cli 3.6.3.
How can i build a Vue.js project for production if the project is not in the web root?
Inside the webserver the project directory is "my/web/directory"
I start the project using webpack template, and set the publicPath and ROOT_API variables:
config/prod.env.js:
'use strict'
module.exports = {
NODE_ENV: '"production"',
ROOT_API: '"http://www.example.com/my/web/directory/myapi/myindex.php"',
publicPath: '/my/web/directory/'
}
After a npm run build i do upload the dist files (just inside the dist folder: static and index.html) the project point to the webserver root and did not find the js files.
How can i point to the right directory path?
I just find the assetsPublicPath inside the build section of the config/index.js, i do configure and now it is working fine.
We are trying to create a custom app using Angular 6. We managed to deploy an Angular 2 app using this ( https://github.com/tastejs/todomvc/tree/gh-pages/examples/angular2 ) example, adding the cumulocity.json file and zipping it.
With Angular 6 we are using Angular CLI to create a project, and used "ng build" to build the app but when we zip the content of the dist folder, even when adding cumulocity.json to it, we only get a blank page when deploying it to the tenant (it's working with "ng serve" on my computer). Any hints how we should proceed or what we are missing?
Thanks :)
Kindly check this link, maybe this is your answerCLick
When you build your angular app after checking the doc.
After that, you are going to make the zip.
Before making zip open index.html inside your build folder and add a "/" on-base href.
CLICK IMG
your href shd look like this