MCPcopy Create free account
hub / github.com/GraphiteEditor/Graphite / collectFiles

Function collectFiles

frontend/vite.config.ts:144–157  ·  view source on GitHub ↗
(directory: string, prefix: string)

Source from the content-addressed store, hash-verified

142 } catch (e) {
143 throw new Error("Failed to generate third-party licenses", { cause: e });
144 }
145 },
146 writeBundle(options) {
147 copyFileSync(path.resolve(projectRootDir, "third-party-licenses.txt"), path.join(options.dir || "dist", "third-party-licenses.txt"));
148 },
149 };
150}
151
152// Splits the Wasm binary into parts small enough for Cloudflare Pages' 25 MiB single-file limit, rejoined at runtime by `initWasm()` in `src/utility-functions/wasm-loader.ts`.
153// Only active when the `SPLIT_WASM` environment variable is set, which CI does for deployments; local builds keep the single file.
154function wasmSplitting(): PluginOption {
155 const PART_SIZE = 24 * 1024 * 1024;
156
157 let partCount = 1;
158
159 return {
160 name: "wasm-splitting",

Callers 1

writeBundleFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected