re: Building a Desktop App with Vue: NW.js VIEW POST

FULL DISCUSSION
 

Compiled app works only when npm run serve running. How to fix that?

 

You will need to take following steps:

1) add vue.config.js file with the following content:

module.exports = {
  publicPath: '.',
};

(if you use vue-cli below 3.3.0, replace publicPath with baseUrl)

2) build the project with yarn build;
3) change main in package.json to

"main": "index.html"

4) copy package.json to dist
5) run ./node_modules/.bin/build --tasks mac-x64 dist (assuming you're on OSX)

You will have your app in dist/dist folder

code of conduct - report abuse