Skip to content

Commit

Permalink
chore(cloudflare): use astro's vite version for plugin type (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilnasy authored Dec 4, 2023
1 parent 1efc2b8 commit 2a2db25
Show file tree
Hide file tree
Showing 3 changed files with 401 additions and 39 deletions.
3 changes: 1 addition & 2 deletions packages/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
"dotenv": "^16.3.1",
"esbuild": "^0.19.5",
"find-up": "^6.3.0",
"tiny-glob": "^0.2.9",
"vite": "^4.5.0"
"tiny-glob": "^0.2.9"
},
"peerDependencies": {
"astro": "^3.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/cloudflare/src/utils/wasm-module-loader.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import { type Plugin } from 'vite';
import type { AstroConfig } from 'astro';

/**
* Loads '*.wasm?module' imports as WebAssembly modules, which is the only way to load WASM in cloudflare workers.
Expand All @@ -17,7 +17,7 @@ export function wasmModuleLoader({
}: {
disabled: boolean;
assetsDirectory: string;
}): Plugin {
}): NonNullable<AstroConfig['vite']['plugins']>[number] {
const postfix = '.wasm?module';
let isDev = false;

Expand Down
Loading

0 comments on commit 2a2db25

Please sign in to comment.