Skip to content

Commit e286c86

Browse files
committed
test(itk-wasm): enable cross origin isolation in browser tests
1 parent 5462d6b commit e286c86

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

packages/core/typescript/itk-wasm/test/pipelines/typescript/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@
3636
"itk-wasm": "workspace:*"
3737
},
3838
"devDependencies": {
39+
"@itk-wasm/demo-app": "workspace:*",
3940
"@itk-wasm/image-io": "workspace:*",
4041
"@itk-wasm/mesh-io": "workspace:*",
4142
"@itk-wasm/transform-io": "workspace:*",
42-
"@itk-wasm/demo-app": "workspace:*",
4343
"@types/node": "^20.2.5",
4444
"esbuild": "^0.25.0",
4545
"shx": "^0.3.4",
4646
"typescript": "^5.3.2",
4747
"vite": "^4.5.11",
48+
"vite-plugin-cross-origin-isolation": "^0.1.6",
4849
"vite-plugin-static-copy": "^0.17.0"
4950
}
50-
}
51+
}

packages/core/typescript/itk-wasm/test/pipelines/typescript/vite.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { defineConfig } from 'vite'
22
import { viteStaticCopy } from 'vite-plugin-static-copy'
3+
import crossOriginIsolation from 'vite-plugin-cross-origin-isolation'
34
import path from 'path'
45

56
const base = process.env.VITE_BASE_URL || '/'
@@ -21,6 +22,8 @@ export default defineConfig({
2122
exclude: ['itk-wasm', '@itk-wasm/image-io', '@itk-wasm/mesh-io', '@itk-wasm/transform-io', '@thewtex/zstddec']
2223
},
2324
plugins: [
25+
// wasm threading
26+
crossOriginIsolation(),
2427
// put lazy loaded JavaScript and Wasm bundles in dist directory
2528
viteStaticCopy({
2629
targets: [

pnpm-lock.yaml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)