diff --git a/src/bindgen/typescript-resources/demo-index.html b/src/bindgen/typescript-resources/demo-index.html
index 9686cbfc4..293bb5f05 100644
--- a/src/bindgen/typescript-resources/demo-index.html
+++ b/src/bindgen/typescript-resources/demo-index.html
@@ -2,15 +2,15 @@
-
-
+
+
-
+
package
@@ -25,6 +25,6 @@
functions
-
+
diff --git a/src/bindgen/typescript-resources/demo.js b/src/bindgen/typescript-resources/demo.ts
similarity index 84%
rename from src/bindgen/typescript-resources/demo.js
rename to src/bindgen/typescript-resources/demo.ts
index fabf60190..4f91f5c2b 100644
--- a/src/bindgen/typescript-resources/demo.js
+++ b/src/bindgen/typescript-resources/demo.ts
@@ -1,4 +1,4 @@
-import * as from '../.js'
+import * as from '../../dist/bundles/.js'
.setPipelinesBaseUrl('/pipelines')
const packageFunctions = []
diff --git a/src/bindgen/typescript-resources/template.package.json b/src/bindgen/typescript-resources/template.package.json
index 3fa0f5503..251c01442 100644
--- a/src/bindgen/typescript-resources/template.package.json
+++ b/src/bindgen/typescript-resources/template.package.json
@@ -16,8 +16,8 @@
"start": "vite -c build/vite.config.js",
"test": "echo \"Error: no test specified\" && exit 1",
"build": "npm run build:tsc && npm run build:node && npm run build:browser && npm run build:demo",
- "build:node": "rollup -c ./rollup.node.config.js",
- "build:browser": "rollup -c ./rollup.browser.config.js",
+ "build:node": "rollup -c ./build/rollup.node.config.js",
+ "build:browser": "rollup -c ./build/rollup.browser.config.js",
"build:tsc": "tsc --pretty",
"build:demo": "vite -c build/vite.config.js build"
},
@@ -30,7 +30,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
- "itk-wasm": "^1.0.0-b.65"
+ "itk-wasm": "^1.0.0-b.72"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^24.0.0",
@@ -42,6 +42,7 @@
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-ignore": "^1.0.10",
"rollup-plugin-polyfill-node": "^0.11.0",
+ "tslib": "^2.5.0",
"typescript": "^4.9.4",
"vite": "^4.0.4",
"vite-plugin-static-copy": "^0.13.0"
diff --git a/src/bindgen/typescript.js b/src/bindgen/typescript.js
index 276b888d1..8cd80488c 100644
--- a/src/bindgen/typescript.js
+++ b/src/bindgen/typescript.js
@@ -145,7 +145,7 @@ function typescriptBindings(outputDir, buildDir, wasmBinaries, options, forNode=
const demoPath = path.join(outputDir, 'test', 'browser', 'app.ts')
if (!fs.existsSync(demoPath)) {
- let demoContent = fs.readFileSync(bindgenResource('demo.js'), { encoding: 'utf8', flag: 'r' })
+ let demoContent = fs.readFileSync(bindgenResource('demo.ts'), { encoding: 'utf8', flag: 'r' })
demoContent = demoContent.replaceAll('', options.packageName)
demoContent = demoContent.replaceAll('', camelCase(packageName))
fs.writeFileSync(demoPath, demoContent)