Subscribe on changes!

How to use webAssembly with vue3?

avatar
Nov 12th 2021

Version

3.2.21

Reproduction link

sfc.vuejs.org/

Steps to reproduce

use a lib called talib-binding

copy the first short code in Example section in https://github.com/acrazing/talib-binding-node

terminal returns " ERROR Failed to compile with 1 error PM4:42:51 error in ./node_modules/talib-binding/build/Release/talib_binding.node

Module parse failed: Unexpected character '�' (1:2) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders (Source code omitted for this binary file)"

Should I create webpack.config.js?And how to modify it?Because this file does not exist by default. Thank you.

What is expected?

call the functions in webAssembly

What is actually happening?

cause error

avatar
Nov 12th 2021
  1. Your issue is missing the required runnable reproduction.
  2. Using webassembly is unrelated to Vue core, it's a question of configuring your build system. Of you are using Vue CLI (which I can't tell as you didn't provide a reproduction), you should open an issue in that project's repository - after you asked for help on chat.vuejs.org.