sql-js/react-sqljs-demo

A demonstration showing how to use sql.js with create-react-app

116

stars

35

commits

JavaScript

primary language

Dec 1, 2023

updated

react-sqljs-demo.ophir.dev/
create-react-app
react
sql
sqlite
sqljs
webpack
Browse cluster: React and Modern JavaScript Build Tooling

README

demonstration of react + sql.js

This is a template repository demonstrating the use of sql.js with create-react-app.

The only differences with a traditional create-react-app application are :

  • The usage of craco to allow providing a custom webpack configuration
  • a small custom webpack configuration in craco.config.js to copy the wasm module from sql.js to the distributed assets

Note that you should make sure your server serves .wasm files with the right mimetype, that is: application/wasm. Otherwise, you'll see the following error: TypeError: Response has unsupported MIME type

See src/App.js for the code.

view the live demo

Contributors

lovasoa

26 commits

sql-js/react-sqljs-demo

A demonstration showing how to use sql.js with create-react-app

116

stars

35

commits

JavaScript

primary language

Dec 1, 2023

updated

react-sqljs-demo.ophir.dev/
create-react-app
react
sql
sqlite
sqljs
webpack
Browse cluster: React and Modern JavaScript Build Tooling

README

demonstration of react + sql.js

This is a template repository demonstrating the use of sql.js with create-react-app.

The only differences with a traditional create-react-app application are :

  • The usage of craco to allow providing a custom webpack configuration
  • a small custom webpack configuration in craco.config.js to copy the wasm module from sql.js to the distributed assets

Note that you should make sure your server serves .wasm files with the right mimetype, that is: application/wasm. Otherwise, you'll see the following error: TypeError: Response has unsupported MIME type

See src/App.js for the code.

view the live demo

Contributors

lovasoa

26 commits

Languages

JavaScript

64.9%

HTML

27.0%

CSS

8.0%