Files
drawio-desktop-mirror/electron-builder-snap.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

73 lines
1.7 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,
"linux": {
"executableName": "drawio",
"category": "Graphics",
"maintainer": "draw.io <snap@draw.io>",
"icon": "./build",
"desktop": {
"entry": {
"StartupWMClass": "draw-io"
}
},
"target": [
"snap"
]
},
"snapcraft": {
"base": "core24",
"core24": {
"useLXD": true,
"plugs": [
"default",
"removable-media",
"browser-support"
]
}
},
"afterPack": "build/fuses.mjs",
"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"
}
]
}