Unable to exclude files from app.asar
See original GitHub issue- Version: 20.28.4 and
- Target: all, but specifically I am currently testing mac
On my project the ability to excludes files by annotating them under the build section in package.json was working.
After adding electron-webpack. This now no longer works. I am seeing everything included in my app.asar file. I have attempted to exclude electron-webpack from my build process and only run electron-build, but I still see everything in app.asar. Here is my debug log from running DEBUG=electron-builder npm run pack
"pack": "electron-builder --dir",
directories:
output: dist
buildResources: src/assets
extraMetadata:
main: main.js
files:
- from: .
filter:
- package.json
- '**/*'
- src
- '!webpack*'
- '!.*'
- '!config/jsdoc.json'
- '!package.json'
- '!docs'
- '!private'
- from: dist/main
- from: dist/renderer
- from: dist/renderer-dll
extraResources:
- from: src/assets
to: assets
filter:
- '!track*'
- '!css'
appId: com.test.test
productName: Test Desktop
copyright: '© 2018 Test, LLC.'
artifactName: '${name}-${version}-${os}-${arch}.${ext}'
publish:
- provider: s3
bucket: xxx
storageClass: STANDARD_IA
path: '${channel}/${os}'
- provider: github
owner: xxx
repo: xxx
linux:
files:
- '!node_modules/@ffprobe-installer/darwin-x64/${/*}'
- '!node_modules/@ffprobe-installer/win32-ia32/${/*}'
- '!node_modules/@ffprobe-installer/win32-x64/${/*}'
- '!node_modules/@ffmpeg-installer/darwin-x64/${/*}'
- '!node_modules/@ffmpeg-installer/win32-ia32/${/*}'
- '!node_modules/@ffmpeg-installer/win32-x64/${/*}'
category: AudioVideoEditing
description: Test desktop video processing and file uploader
icon: src/assets/icon.png
desktop:
Name: Test-Desktop
GenericName: Test Desktop
X-GNOME-FullName: test-desktop
Comment: Test desktop video processing and file uploader
Type: Application
Terminal: 'false'
StartupNotify: 'false'
Categories: AudioVideoEditing
mac:
files:
- '!node_modules/@ffprobe-installer/linux-ia32/${/*}'
- '!node_modules/@ffprobe-installer/linux-x64/${/*}'
- '!node_modules/@ffprobe-installer/win32-ia32/${/*}'
- '!node_modules/@ffprobe-installer/win32-x64/${/*}'
- '!node_modules/@ffmpeg-installer/linux-ia32/${/*}'
- '!node_modules/@ffmpeg-installer/linux-x64/${/*}'
- '!node_modules/@ffmpeg-installer/win32-ia32/${/*}'
- '!node_modules/@ffmpeg-installer/win32-x64/${/*}'
category: public.app-category.video
win:
files:
- '!node_modules/@ffprobe-installer/linux-ia32/${/*}'
- '!node_modules/@ffprobe-installer/linux-x64/${/*}'
- '!node_modules/@ffprobe-installer/darwin-x64/${/*}'
- '!node_modules/@ffmpeg-installer/linux-ia32/${/*}'
- '!node_modules/@ffmpeg-installer/linux-x64/${/*}'
- '!node_modules/@ffmpeg-installer/darwin-x64/${/*}'
certificateFile: private/test.pfx
verifyUpdateCodeSignature: false
publisherName: trackops
extends: electron-webpack/electron-builder.yml
electronVersion: 3.0.7
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Exclude some folders, while doing electron-packager . --asar
Is it possible to exclude some of folders? Yes, you can do it with ignore. You can use --ignore to ignore files and...
Read more >Common Configuration - electron-builder
asarUnpack Array<String> | String | “undefined” - A glob patterns relative to the app directory, which specifies which files to unpack when creating...
Read more >Options | electron-packager
Ignores system junk files when copying the Electron app, regardless of the ignore option. Note: junk will have no effect if the prebuiltAsar...
Read more >asar | Yarn - Package Manager
Asar is a simple extensive archive format, it works like tar that concatenates all files together without compression, while having random access support....
Read more >Configuration - Electron Forge
If you do not have config.forge set in your package.json file, Forge will attempt ... is the Electron Forge configuration associated with the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
i’m also having the issue! in my package.json i’m limiting files to a folder with precompiled files (via webpack) and an assets folder
which results in yaml:
but my whole repo gets bundled into the app. i’m on macOS, electron-builder is
20.38.4
It seems bug in the merge parent and project configs. I will take a look tomorrow morning CET.