gl-matrix-wasm
gl-matrix-wasm copied to clipboard
Critical dependency error
Hello, @dtysky !
I've came across this lib and would like to use it as a replacement for gl-matrix on one of our projects. Currently facing the issue right after the installation via npm:
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
Could you please hint me on what am I doing wrong?
gl-matrix-wasm version: 0.8.0
Webpack confing:
module.exports = (env, argv) => {
return {
target: 'web',
module: {
rules: [
...
{
test: /\.wasm$/,
type: 'webassembly/async'
}
]
},
experiments: {
asyncWebAssembly: true,
},
...
};
};
Could you use the "One JS file" mode?
I would really prefer to only load what is about to be executed, but I can try as an experiment. Will drop you a line when have some results.
I would really prefer to only load what is about to be executed, but I can try as an experiment. Will drop you a line when have some results.
Dose "webpack dynamic module" solve your problme ?