Files
drawio-desktop-mirror/electron-builder-linux-mac.json
David BensonandClaude Fable 5.1 826ca5b07e Drops files the packaged app never reads from app.asar
The stencil XML is embedded in js/stencils.min.js, shapes/** is compiled
into js/shapes-14-6-5.min.js (allowEval is off on desktop), the
unminified js/diagramly, js/grapheditor and mxgraph sources only load
with dev=1, the ESM main process resolves @cantoo/pdf-lib to its es
build so cjs/dist/src are dead, and nothing reads *.map. Measured on the
v31.4.4 macOS build that is 1780 files and 81.5 MB less in app.asar,
roughly 15 MB off the installers.

DRAWIO_ENV=dev on a packaged build now keeps the minified bundles instead
of a blank window: dev=1 is only passed when the sources are present.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-08 10:27:43 +01:00

152 lines
3.8 KiB
JSON

{
"appId": "com.jgraph.drawio.desktop",
"copyright": "Copyright 2017-2026 draw.io Ltd",
"asar": true,
"files": [
"**/*",
"!**/WEB-INF{,/**}",
"!drawio/src/main/webapp/stencils/**/*.xml",
"!drawio/src/main/webapp/shapes{,/**}",
"!drawio/src/main/webapp/js/diagramly{,/**}",
"drawio/src/main/webapp/js/diagramly/{ElectronApp,DesktopLibrary}.js",
"!drawio/src/main/webapp/js/grapheditor{,/**}",
"!drawio/src/main/webapp/mxgraph/src{,/**}",
"!drawio/src/main/webapp/mxgraph/mxClient.js",
"!node_modules/@cantoo/pdf-lib/{cjs,dist,src,ts3.4}{,/**}",
"!**/*.map"
],
"artifactName": "${productName}-${arch}-${version}.${ext}",
"directories": {
"output": "./dist/"
},
"npmRebuild": false,
"publish": {
"provider": "github"
},
"mac": {
"hardenedRuntime": true,
"gatekeeperAssess": false,
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.plist",
"category": "public.app-category.graphics-design",
"extendInfo": {
"UTExportedTypeDeclarations": [
{
"UTTypeIdentifier": "com.jgraph.drawio",
"UTTypeDescription": "draw.io Diagram",
"UTTypeConformsTo": ["public.xml", "public.data"],
"UTTypeTagSpecification": {
"public.filename-extension": ["drawio"],
"public.mime-type": ["application/vnd.jgraph.mxfile"]
}
}
],
"CFBundleDocumentTypes": [
{
"CFBundleTypeExtensions": ["drawio"],
"CFBundleTypeName": "draw.io Diagram",
"CFBundleTypeRole": "Editor",
"CFBundleTypeIconFile": "icon.icns",
"LSItemContentTypes": ["com.jgraph.drawio"],
"LSHandlerRank": "Owner"
},
{
"CFBundleTypeExtensions": ["vsdx"],
"CFBundleTypeName": "VSDX Document",
"CFBundleTypeRole": "Editor",
"CFBundleTypeIconFile": "icon.icns",
"LSHandlerRank": "Default"
},
{
"CFBundleTypeExtensions": ["mmd", "mermaid"],
"CFBundleTypeName": "Mermaid Diagram",
"CFBundleTypeRole": "Editor",
"CFBundleTypeIconFile": "icon.icns",
"LSHandlerRank": "Default"
}
]
},
"target": [
{ "target": "zip", "arch": [
"x64",
"arm64"
]
},
{ "target": "dmg", "arch": [
"x64",
"arm64",
"universal"
]
}
]
},
"beforePack": "build/dmg-hidden-files.mjs",
"afterSign": "build/notarize.mjs",
"afterPack": "build/fuses.mjs",
"dmg": {
},
"toolsets": {
"appimage": "1.0.3"
},
"appImage": {
"compression": "gzip"
},
"linux": {
"executableName": "drawio",
"category": "Graphics",
"maintainer": "draw.io <desktop@draw.io>",
"icon": "./build",
"desktop": {
"entry": {
"StartupWMClass": "draw-io"
}
},
"target": [
{ "target": "AppImage", "arch": [
"x64",
"arm64"
]
},
{ "target": "deb", "arch": [
"x64",
"arm64"
]
},
{ "target": "rpm", "arch": [
"x64",
"arm64"
]
}
]
},
"rpm": {
"fpm": [
"--rpm-rpmbuild-define=_build_id_links none",
"--rpm-digest=sha256"
]
},
"fileAssociations": [
{
"ext": "drawio",
"name": "draw.io Diagram",
"description": "draw.io Diagram",
"mimeType": "application/vnd.jgraph.mxfile",
"role": "Editor"
},
{
"ext": "vsdx",
"name": "VSDX Document",
"description": "VSDX Document",
"mimeType": "application/vnd.visio",
"role": "Editor"
},
{
"ext": ["mmd", "mermaid"],
"name": "Mermaid Diagram",
"description": "Mermaid Diagram",
"mimeType": "text/vnd.mermaid",
"role": "Editor"
}
]
}