photon
photon copied to clipboard
Webpack import problem
I am trying to import photon in a existing web project. Here is my webpack loader.
{
test: /\.wasm$/,
use: [
{
loader: 'file-loader',
},
],
type: 'javascript/auto',
}
I get this error :
./node_modules/@silvia-odwyer/photon/photon.js
Attempted import error: '__wbg_photonimage_free' is not exported from './photon_bg.wasm' (imported as 'wasm').
Have you an example to import photon ?
have you set
experiments: {
syncWebAssembly: true,
}
in your webpack.config.js?
have you set
experiments: { syncWebAssembly: true, }
in your webpack.config.js?
Work for me.
I use webpack 5 without external wasm loader but only add options syncWebAssembly: true