1
0
mirror of https://github.com/lancedikson/bowser synced 2026-10-09 12:22:12 +00:00

Dual packaging, without breaking existing consumers (#628)

Co-authored-by: Yasumasa Ashida <ys.ashida@gmail.com>
This commit is contained in:
Naor Peled
2026-08-30 00:10:11 +03:00
committed by GitHub
parent a37b8be8a7
commit a88622557d
20 changed files with 10542 additions and 14655 deletions

16
build/entries/bundled.js Normal file
View File

@@ -0,0 +1,16 @@
/**
* UMD entry point for `bundled.js` — same as `es5.js`, but with the polyfills
* needed by the browser targets baked in.
*
* `core-js/stable` + `regenerator-runtime/runtime` is the core-js@3 equivalent
* of the deprecated `@babel/polyfill` that this bundle used to be built from.
* `@babel/preset-env`'s `useBuiltIns: 'entry'` rewrites the `core-js/stable`
* import below into just the polyfills the configured targets actually need.
*
* See `./es5.js` for why this only re-exports the default.
*/
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import Bowser from '../../src/bowser.js';
export default Bowser;