I've tried to build taplo-ide in my environment for transplant to vim, but I got error.
I'm beginner in wasm and rust, So I can't find what cause this bug and evaluate my way to build is correct or not. I suspect this issue is related to this error but I'm not sure. Sorry if I'm wrong.
Debugger listening on ws://127.0.0.1:46543/63284125-1b94-4376-bde6-7c6f630fa7a9
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
> [email protected] webpack-server /(project_root)/taplo-ide/vscode
> webpack --config webpack.config.server.js --mode production
Debugger listening on ws://127.0.0.1:45305/c9a15a5e-777e-41b3-8929-039fc99e2277
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Debugger listening on ws://127.0.0.1:35467/98246438-8f84-49c7-ae87-db298bc34fc3
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Waiting for the debugger to disconnect...
Hash: 7426d92239a271a038f0
Version: webpack 4.43.0
Time: 2249ms
Built at: 2020-09-14 17:43:27
3 assets
Entrypoint main = server.js server.js.map
[0] ../pkg/taplo_ide_bg.js 9.99 KiB {0} [built]
[1] ../pkg/taplo_ide_bg.wasm 3.01 MiB {0} [built]
[2] ./src/server.ts 599 bytes {0} [built]
[3] ../pkg/taplo_ide.js 79 bytes {0} [built]
[4] (webpack)/buildin/harmony-module.js 573 bytes {0} [built]
[5] external "fs" 42 bytes {0} [built]
ERROR in ../pkg/taplo_ide_bg.wasm
WebAssembly module is included in initial chunk.
This is not allowed, because WebAssembly download and compilation must happen asynchronous.
Add an async splitpoint (i. e. import()) somewhere between your entrypoint and the WebAssembly module:
* ./src/server.ts --> ../pkg/taplo_ide.js --> ../pkg/taplo_ide_bg.wasm
* ... --> ../pkg/taplo_ide.js --> ../pkg/taplo_ide_bg.js --> ../pkg/taplo_ide_bg.wasm
* ... --> ../pkg/taplo_ide.js --> ../pkg/taplo_ide_bg.wasm --> ../pkg/taplo_ide_bg.js --> ../pkg/taplo_ide_bg.wasm
* ... --> ../pkg/taplo_ide_bg.js --> ../pkg/taplo_ide_bg.wasm --> ../pkg/taplo_ide_bg.js --> ../pkg/taplo_ide_bg.wasm
Debugger listening on ws://127.0.0.1:45305/c9a15a5e-777e-41b3-8929-039fc99e2277
For help, see: https://nodejs.org/en/docs/inspector
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] webpack-server: `webpack --config webpack.config.server.js --mode production`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] webpack-server script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /$HOME/.npm/_logs/2020-09-14T08_43_27_211Z-debug.log
cargo 1.45.1
rustup 1.22.1
wasm-pack 0.9.1
npm 6.14.6
node 12.18.3