Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Native ESM modules using CDN for browser example #277

Open
park-brian opened this issue Apr 5, 2023 · 1 comment
Open

Enhancement: Native ESM modules using CDN for browser example #277

park-brian opened this issue Apr 5, 2023 · 1 comment

Comments

@park-brian
Copy link

First of all, thank you for this great library. It is tremendously helpful for client-side exploration of MS Access databases.

I noticed that the browser-based example is using parcel to bundle the assets. You are probably aware of this, but it is possible to eliminate the build/bundling step by referencing a CDN. For example:

import { Buffer } from 'https://cdn.jsdelivr.net/npm/buffer@6/+esm'
import MDBReader from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm' // @latest or @2 can be used instead

This could prove helpful for importing this library directly in the browser or other JavaScript runtimes that don't use a package manager.

@andipaetzold
Copy link
Owner

Hey @park-brian, thanks for the positive feedback.

great idea! Parcel made some problems in the past anyway, so using jsdelivr sounds like a good way to work around that. Feel free to open a PR - otherwise I'll touch it whenever I work on the library the next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants