You will need to take following steps:
1) add vue.config.js file with the following content:
vue.config.js
module.exports = { publicPath: '.', };
(if you use vue-cli below 3.3.0, replace publicPath with baseUrl)
publicPath
baseUrl
2) build the project with yarn build; 3) change main in package.json to
yarn build
main
package.json
"main": "index.html"
4) copy package.json to dist 5) run ./node_modules/.bin/build --tasks mac-x64 dist (assuming you're on OSX)
dist
./node_modules/.bin/build --tasks mac-x64 dist
You will have your app in dist/dist folder
dist/dist
This works but we can find the source file under js folder. If NW.js keep source file then why I'am use it? It will be better to use Electron. Please tell me if there is a way to build a desktop app with compiled source code from vue.
Is not working...
Add file vue.config.js in root, make command: npm run nw-serve compiled app works, more vue is not work
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You will need to take following steps:
1) add
vue.config.js
file with the following content:(if you use vue-cli below 3.3.0, replace
publicPath
withbaseUrl
)2) build the project with
yarn build
;3) change
main
inpackage.json
to4) copy
package.json
todist
5) run
./node_modules/.bin/build --tasks mac-x64 dist
(assuming you're on OSX)You will have your app in
dist/dist
folderThis works but we can find the source file under js folder. If NW.js keep source file then why I'am use it? It will be better to use Electron. Please tell me if there is a way to build a desktop app with compiled source code from vue.
Is not working...
Add file vue.config.js in root, make command:
npm run nw-serve
compiled app works, more vue is not work