You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importinitSqlJsfrom"sql.js";// Required to let webpack 4 know it needs to copy the wasm file to our assets// import sqlWasm from "!!file-loader?name=sql-wasm-[contenthash].wasm!sql.js/dist/sql-wasm.wasm";const[db,setDb]=useState(null)useEffect(()=>{if(db==null){initSqlJs({locateFile: sqlWasm}).then(SQL=>setDb(newSQL.Database())).catch(err=>console.error(err)||Message.error("init sqlite failed"));}},[db])
unexpected '!' in '!!file-loader?name=sql-wasm-[contenthash].wasm!sql.js/dist/sql-wasm.wasm'. do not use import syntax to configure webpack loaders · Issue #7 · sql-js/react-sqljs-demo
Activity
Jansora commentedon Dec 15, 2021
i solve this error with doing this.
"sql.js": "1.5.0",
then.
try using sql.js with this