summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Arsh <69170106+lilnasy@users.noreply.github.com> 2023-12-04 09:57:58 +0000
committerGravatar GitHub <noreply@github.com> 2023-12-04 10:57:58 +0100
commit39e288a7f734d0abfe563d2694c523fe8ea8cc18 (patch)
tree36c8e1b6d86445dd7dddd6e6b11bf7fe664c9dc2
parentc3255e82ff975a907d2106e5de9bb5a19215ad05 (diff)
downloadastro-39e288a7f734d0abfe563d2694c523fe8ea8cc18.tar.gz
astro-39e288a7f734d0abfe563d2694c523fe8ea8cc18.tar.zst
astro-39e288a7f734d0abfe563d2694c523fe8ea8cc18.zip
chore(cloudflare): use astro's vite version for plugin type (#82)
-rw-r--r--packages/integrations/cloudflare/package.json3
-rw-r--r--packages/integrations/cloudflare/src/utils/wasm-module-loader.ts4
2 files changed, 3 insertions, 4 deletions
diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json
index 719da7725..0e4f6c635 100644
--- a/packages/integrations/cloudflare/package.json
+++ b/packages/integrations/cloudflare/package.json
@@ -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"
diff --git a/packages/integrations/cloudflare/src/utils/wasm-module-loader.ts b/packages/integrations/cloudflare/src/utils/wasm-module-loader.ts
index 7d34d48c3..65a0e826d 100644
--- a/packages/integrations/cloudflare/src/utils/wasm-module-loader.ts
+++ b/packages/integrations/cloudflare/src/utils/wasm-module-loader.ts
@@ -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.
@@ -17,7 +17,7 @@ export function wasmModuleLoader({
}: {
disabled: boolean;
assetsDirectory: string;
-}): Plugin {
+}): NonNullable<AstroConfig['vite']['plugins']>[number] {
const postfix = '.wasm?module';
let isDev = false;