Skip to content

Commit

Permalink
remove remaining webpack commands
Browse files Browse the repository at this point in the history
  • Loading branch information
toloudis committed Dec 30, 2024
1 parent caba6c0 commit 12e4213
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ lib
es
build
demo
public/dist
public/demo
public/volumeviewer

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"build-docs": "node node_modules/documentation/bin/documentation.js build src/Histogram.ts src/View3d.ts src/Volume.ts src/VolumeMaker.ts src/VolumeLoader.ts -f html -o docs --shallow",
"build": "npm run transpileES && npm run build-types",
"build-types": "tsc -p tsconfig.types.json",
"build-demo": "webpack --config webpack.demo.js",
"build-demo": "vite build public/ --config vite.config.ts --outDir ./demo",
"clean": "rimraf es/",
"format": "prettier --write src/**/*.js",
"gh-build": "webpack --config webpack.dev.js",
"dev": "webpack serve --config webpack.dev.js",
"format": "prettier --write src/**/*.ts",
"gh-build": "vite build public/ --config vite.config.ts --outDir ./volumeviewer",
"dev": "vite serve",
"start": "vite serve",
"react-example": "webpack serve --config react-example/webpack.react.js",
"lint": "eslint --config ./.eslintrc.json --ignore-path ./.eslintignore --ext .jsx --ext .js --ext .ts ./src",
Expand Down
2 changes: 1 addition & 1 deletion src/loaders/TiffLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ class TiffLoader extends ThreadableVolumeLoader {
url: this.url,
};

const worker = new Worker(new URL("../workers/FetchTiffWorker", import.meta.url));
const worker = new Worker(new URL("../workers/FetchTiffWorker", import.meta.url), {type: "module"});
worker.onmessage = (e: MessageEvent<TiffLoadResult | { isError: true; error: ErrorObject }>) => {
if (e.data.isError) {
reject(deserializeError(e.data.error));
Expand Down
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ export default {
server: {
open: "public/index.html",
},
worker: {
format: "es",
},
} satisfies UserConfig;

0 comments on commit 12e4213

Please sign in to comment.