A typo in wasm docs
steida opened this issue · 4 comments
Here https://docs.cossacklabs.com/themis/languages/wasm/installation/
node: {
fs: 'empty'
}
Should be ws
. Also, Webpack 5 has a different format:
config.resolve.fallback = {
...config.resolve.fallback,
// Themis
ws: false,
};
@steida, I think fs
is the correct one. There is no Node.js module named ws
. This statement suppresses warnings from webpack caused by Node.js compatibility shims that Emscripten adds to generated code. They should never actually be used in Web environments, but exist in the code.
Do you experience issues with fs
which get fixed by using ws
? 🤔
Regarding webpack 5, you are absolutely right. I've filed a PR to provide an example for webpack 5 syntax. Thanks.
@steida, I think
fs
is the correct one. There is no Node.js module namedws
. This statement suppresses warnings from webpack caused by Node.js compatibility shims that Emscripten adds to generated code. They should never actually be used in Web environments, but exist in the code.Do you experience issues with
fs
which get fixed by usingws
? 🤔
It fixed my code, that's why I made an issue. But I already deleted experimental Themis branch, so I can not retest it. 1mb gzipped for web is no-go.
thank you guys! The docs are updated
https://docs.cossacklabs.com/themis/languages/wasm/installation/