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 dc1febc commit 1755926
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions packages/cloudflare/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { AstroConfig, AstroIntegration, RouteData } from 'astro';

import * as fs from 'node:fs';
import * as os from 'node:os';
import { relative } from 'node:path';
import { fileURLToPath } from 'node:url';
import { createRedirectsFromAstroRoutes } from '@astrojs/underscore-redirects';
import { AstroError } from 'astro/errors';
Expand Down Expand Up @@ -152,7 +151,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 1755926

Please sign in to comment.