electron-vue app.asar
The following examples are based on the window system, and the project is an electron-vue project, using vue-cli-plugin-electron-builder as the packaging tool.
The location of app.asar
win-unpacked
A folder called will be generated in the packaging directory , which win-unpacked
contains the software's exe execution file and other folders, including resources
some folders.
app.asar
The location is just resources
below.
Unzip app.asar
app.asar
Tools are required for decompression asar
and can be installed globally using npm.
npm install asar -g
The decompression command is as follows:
asar e app.asar ./app
After decompression, you will find that an app directory folder will be generated in the directory. After opening, you will find that after app.asar
decompression, there is a bunch of packaged js and css and some static resource files.
_static和 _dirname
__dirname
and __static
in a dev environment, represents the following path:
dev | produce | |
---|---|---|
__dirname | Point to the directory where the main.js file is located | Directed <app.asar> |
__static | Point to publish (static resource directory) | Directed <app.asar> |