MCPcopy Create free account
hub / github.com/esengine/esengine / writeBundle

Function writeBundle

packages/editor-app/vite.config.ts:42–57  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

40 return {
41 name: 'copy-plugin-modules',
42 writeBundle(options) {
43 const outDir = options.dir || 'dist';
44 const assetsDir = path.join(outDir, 'assets');
45
46 if (!fs.existsSync(assetsDir)) {
47 fs.mkdirSync(assetsDir, { recursive: true });
48 }
49
50 for (const mod of modulePaths) {
51 if (!fs.existsSync(mod.path)) {
52 console.warn(`[copy-plugin-modules] ${mod.name} dist not found: ${mod.path}`);
53 continue;
54 }
55 copyJsFilesRecursively(mod.path, assetsDir);
56 }
57 }
58 };
59}
60

Callers

nothing calls this directly

Calls 13

copyJsFilesRecursivelyFunction · 0.85
getWasmSizeFunction · 0.85
stringifyMethod · 0.80
getEngineModulesFunction · 0.70
parseMethod · 0.65
readFileSyncMethod · 0.65
pushMethod · 0.65
writeFileSyncMethod · 0.65
joinMethod · 0.45
warnMethod · 0.45
logMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected