Hey everyone
I'm trying to implement
SQLDelight
in a KMP project that supports Android, iOS, JS and JVM
In case of
JS
, the
documentation suggests adding the following files inside
webpack.conf.d
package (which in my case is
webpack.config.d
since I used KVision to build my JS project):
fs.js
// project/webpack.conf.d/fs.js
config.resolve = {
fallback: {
fs: false,
path: false,
crypto: false,
}
};
and
wasm.js
// project/webpack.conf.d/wasm.js
const CopyWebpackPlugin = require('copy-webpack-plugin');
config.plugins.push(
new CopyWebpackPlugin({
patterns: [
{
from: '../../node_modules/sql.js/dist/sql-wasm.wasm',
to: '../../../{your project}/build/distributions'
}
]
})
);
Alongwith that, I need to add 2 npm deps as well i.e.
sql.js
and
copy-webpack-plugin
I did it all, but when I try to launch the app, I see the following error: