Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't integrate dependencies with WASM modules #171

Open
AyymericArn opened this issue May 5, 2022 · 0 comments
Open

Can't integrate dependencies with WASM modules #171

AyymericArn opened this issue May 5, 2022 · 0 comments

Comments

@AyymericArn
Copy link

Hi, I have an app that requires the package gltf-transform to work. This package uses numerous wasm modules.

I configured copy-webpack-plugin so that the necessary wasm files are copied in the dist directory. The configuration of copy webpack plugin looks like this :

patterns: [
  {
    from: "*.wasm",
    context: "./node_modules/@squoosh/lib/build/"
  },
  "./node_modules/draco3d/draco_decoder.wasm",
  "./node_modules/draco3dgltf/draco_decoder_gltf.wasm",
  "./node_modules/draco3dgltf/draco_encoder.wasm",
],

Thus, I can properly launch the compiled app with node_modules/.bin/qode dist/index.js. My problem is that once compiled, the app will exit immediately after launch.

I am on MacOS Monterey 12.2.1, Intel CPU. I checked the MacOS console but could find nothing relevant.

To reproduce, simply use the nodegui-starter, add the gltf-transform dependency, add the line import { Mode, toktx as ktx } from '@gltf-transform/cli' to index.js (I made it JS to avoid TS problems at build time), add '.json' to resolve section of webpack config, and try compiling and packing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant