Skip to content

Commit

Permalink
addresses review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderniebuhr committed Mar 26, 2024
1 parent f49ffc8 commit aa344d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cloudflare/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export default function createIntegration(args?: Options): AstroIntegration {
vite.build ||= {};
vite.build.rollupOptions ||= {};
vite.build.rollupOptions.output ||= {};
// @ts-ignore
// @ts-expect-error
vite.build.rollupOptions.output.banner ||= 'globalThis.process ??= {};';

vite.build.rollupOptions.external = _config.vite?.build?.rollupOptions?.external ?? [];
Expand Down
1 change: 1 addition & 0 deletions packages/cloudflare/src/utils/wasm-module-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function wasmModuleLoader({
assetsInclude: ['**/*.wasm?module'],
build: {
rollupOptions: {
// mark the wasm files as external so that they are not bundled and instead are loaded from the files
external: [/^__WASM_ASSET__.+\.wasm$/i, /^__WASM_ASSET__.+\.wasm.mjs$/i],
},
},
Expand Down

0 comments on commit aa344d4

Please sign in to comment.