@browser-compat/boot
v0.1.2
Published
Early boot fallback script generator for browser-compat.
Readme
@browser-compat/boot
Early boot fallback script generator for the Browser Compat toolkit.
Browser Compat helps applications generate browser compatibility manifests from
their own browserslist targets, check those manifests in CI, and use the
result at runtime through small framework adapters.
What This Package Does
@browser-compat/boot creates a small script that can run before the main app
bundle. It checks boot-critical browser APIs and shows an unsupported-browser
fallback if those APIs are missing.
The generated script avoids modern syntax markers such as arrow functions,
let, const, async, and optional chaining.
Installation
npm install @browser-compat/bootUsage
import { createCompatBootScript } from "@browser-compat/boot";
const script = createCompatBootScript({
message: "Please upgrade your browser to continue."
});Inject the returned script before the main application bundle.
Related Packages
@browser-compat/cligenerates manifests and reports.@browser-compat/reactprovides React bindings.@browser-compat/runtimeevaluates manifests in the browser.
Full documentation: https://github.com/relaxcloud-cn/browser-compat-package
