[ci] format
This commit is contained in:
parent
faeead4232
commit
0352dec47b
3 changed files with 11 additions and 7 deletions
|
@ -197,9 +197,9 @@ export default defineConfig({
|
||||||
|
|
||||||
default: `false`
|
default: `false`
|
||||||
|
|
||||||
Whether or not to import `.wasm` files [directly as ES modules](https://github.com/WebAssembly/esm-integration/tree/main/proposals/esm-integration).
|
Whether or not to import `.wasm` files [directly as ES modules](https://github.com/WebAssembly/esm-integration/tree/main/proposals/esm-integration).
|
||||||
|
|
||||||
Add `wasmModuleImports: true` to `astro.config.mjs` to enable in both the Cloudflare build and the Astro dev server.
|
Add `wasmModuleImports: true` to `astro.config.mjs` to enable in both the Cloudflare build and the Astro dev server.
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
// astro.config.mjs
|
// astro.config.mjs
|
||||||
|
@ -214,9 +214,9 @@ export default defineConfig({
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
Once enabled, you can import a web assembly module in Astro with a `.wasm?module` import.
|
Once enabled, you can import a web assembly module in Astro with a `.wasm?module` import.
|
||||||
|
|
||||||
The following is an example of importing a Wasm module that then responds to requests by adding the request's number parameters together.
|
The following is an example of importing a Wasm module that then responds to requests by adding the request's number parameters together.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// pages/add/[a]/[b].js
|
// pages/add/[a]/[b].js
|
||||||
|
|
|
@ -350,7 +350,7 @@ export default function createIntegration(args?: Options): AstroIntegration {
|
||||||
'node:stream',
|
'node:stream',
|
||||||
'node:string_decoder',
|
'node:string_decoder',
|
||||||
'node:util',
|
'node:util',
|
||||||
],
|
],
|
||||||
entryPoints: pathsGroup,
|
entryPoints: pathsGroup,
|
||||||
outbase: absolutePagesDirname,
|
outbase: absolutePagesDirname,
|
||||||
outdir: outputDir,
|
outdir: outputDir,
|
||||||
|
|
|
@ -41,7 +41,11 @@ export async function runCLI(
|
||||||
let cli;
|
let cli;
|
||||||
let lastErr;
|
let lastErr;
|
||||||
while (triesRemaining > 0) {
|
while (triesRemaining > 0) {
|
||||||
cli = await tryRunCLI(basePath, { silent, timeout, forceRotatePort: triesRemaining !== maxAttempts });
|
cli = await tryRunCLI(basePath, {
|
||||||
|
silent,
|
||||||
|
timeout,
|
||||||
|
forceRotatePort: triesRemaining !== maxAttempts,
|
||||||
|
});
|
||||||
try {
|
try {
|
||||||
await cli.ready;
|
await cli.ready;
|
||||||
return cli;
|
return cli;
|
||||||
|
@ -148,7 +152,7 @@ const isPortOpen = async (port) => {
|
||||||
resolve(true);
|
resolve(true);
|
||||||
s.close();
|
s.close();
|
||||||
});
|
});
|
||||||
s.listen(port, "0.0.0.0");
|
s.listen(port, '0.0.0.0');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue