Skip to content
/ webpack-starter Public template

Demonstrates bundling level for browsers using webpack.

License

Notifications You must be signed in to change notification settings

Level/webpack-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack-starter

Demonstrates bundling level for browsers using webpack.
See also Level/browserify-starter.

level badge Test Donate

Getting Started

git clone https://github.com/Level/webpack-starter.git
cd webpack-starter
npm install
npm run build

Then open index.html in a browser of choice. You're now ready to use your level database, backed by IndexedDB!

In order to reduce bundle size, the webpack configuration at webpack.config.js excludes the buffer polyfill. To store binary data, either change the webpack configuration, or use Uint8Array instead of Buffer. For example:

import { Level } from 'level'

const db = new Level('webpack-starter', {
  keyEncoding: 'view'
})

await db.put(new Uint8Array([1, 2]), 'example')
const example = await db.get(new Uint8Array([1, 2]))

Contributing

Level/webpack-starter is an OPEN Open Source Project. This means that:

Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.

See the Contribution Guide for more details.

Donate

Support us with a monthly donation on Open Collective and help us continue our work.

License

MIT

About

Demonstrates bundling level for browsers using webpack.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published