Skip to content

Can not build electron without the internet connection #16465

Discussion options

You must be logged in to vote

For now, I found the solution by replace dependencies path point to local path (node_modules folder) instead of original value.

Add below script to quasar.config.ts in electron section

extendPackageJson(pkg) {
const dependencies = pkg.dependencies;
var _newdependenciesString = '{';
for (let obj in dependencies) {
obj = "${obj}" : "file:..\\\\..\\\\..\\\\node_modules\\\\${obj}";
_newdependenciesString += ${obj},;
}
_newdependenciesString = _newdependenciesString.slice(0, -1);
_newdependenciesString += '}';
const _newobj = JSON.parse(_newdependenciesString);
pkg.dependencies = _newobj;
},

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by siripot12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant