From b54fef91a6459bf48816e2ce499d39fe9c7e20b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20H=C3=A4rtl?= Date: Mon, 3 Jun 2024 16:44:58 +0200 Subject: [PATCH 1/2] Do not copy mikktspace wasm twice --- package.json | 10 +++++----- rollup.config.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index b7c0712c..baeec8ae 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "url": "git+https://github.com/KhronosGroup/glTF-Sample-Viewer.git" }, "scripts": { - "build": "echo 'Please run `npm run build` from the `app_web` or `app_headless` directory.'", + "build": "rollup -c", "dev": "echo 'Please run `npm run dev` from the `app_web` or `app_headless` directory.'", "prepublishOnly": "npm run build && npm run build_docs", "build_docs": "./node_modules/.bin/jsdoc2md source/gltf-sample-viewer.js source/GltfView/gltf_view.js source/GltfState/gltf_state.js source/ResourceLoader/resource_loader.js source/gltf/user_camera.js > API.md", @@ -31,15 +31,15 @@ "jpeg-js": "^0.4.3" }, "devDependencies": { - "rollup": "^2.79.1", - "rollup-plugin-copy": "^3.4.0", - "rollup-plugin-glslify": "^1.3.1", - "@rollup/plugin-wasm": "^6.1.3", "@rollup/plugin-commonjs": "^22.0.2", "@rollup/plugin-node-resolve": "^14.1.0", + "@rollup/plugin-wasm": "^6.1.3", "concurrently": "^7.4.0", "eslint": "^8.24.0", "jsdoc-to-markdown": "^7.1.1", + "rollup": "^2.79.1", + "rollup-plugin-copy": "^3.4.0", + "rollup-plugin-glslify": "^1.3.1", "serve": "^14.0.1" }, "bugs": { diff --git a/rollup.config.js b/rollup.config.js index 28703e63..82c29595 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -20,7 +20,7 @@ export default { } ], plugins: [ - wasm(), + wasm( {fileName: "libs/[name][extname]", publicPath: "./"} ), glslify(), resolve({ browser: false, From 297fc81c9f254ececd2a8be482a048af459ccf70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20H=C3=A4rtl?= Date: Mon, 3 Jun 2024 17:07:21 +0200 Subject: [PATCH 2/2] Fix utils import --- rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 82c29595..9ea3a9af 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -23,7 +23,7 @@ export default { wasm( {fileName: "libs/[name][extname]", publicPath: "./"} ), glslify(), resolve({ - browser: false, + browser: true, preferBuiltins: false, dedupe: ['gl-matrix', 'jpeg-js', 'fast-png'] }),