1
0
mirror of https://github.com/lancedikson/bowser synced 2026-10-06 19:05:41 +00:00

chore: Install tsdown and create a dual package for UMD and ESM

This commit is contained in:
Yasumasa Ashida
2026-06-14 23:40:58 +09:00
parent 6ff01f53db
commit 479d002bc2
5 changed files with 575 additions and 60 deletions

24
tsdown.config.ts Normal file
View File

@@ -0,0 +1,24 @@
import { defineConfig } from 'tsdown';
const banner = `Bowser - a browser detector
https://github.com/lancedikson/bowser
MIT License | (c) Dustin Diaz 2012-2015
MIT License | (c) Denis Demchenko 2015-2026`;
export default defineConfig([
{
entry: ['src/bowser.js'],
format: ['umd'],
outDir: 'dist/umd', // universal module definition
globalName: 'Bowser',
dts: false,
clean: true,
},
{
entry: ['src/bowser.js'],
format: ['esm'],
outDir: 'dist/esm', // es module
dts: false,
clean: true
},
])