1
0
mirror of https://github.com/lancedikson/bowser synced 2026-10-08 03:41:50 +00:00

chore: Install @rolldown/plugin-babel and update tsdown.config.ts

This commit is contained in:
Yasumasa Ashida
2026-06-15 09:23:47 +09:00
parent b339e6215c
commit 4ba3be2e46
3 changed files with 45 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
import { defineConfig } from 'tsdown';
import babel from '@rolldown/plugin-babel'
const banner = `Bowser - a browser detector
https://github.com/lancedikson/bowser
@@ -9,6 +10,23 @@ export default defineConfig([
{
entry: ['src/bowser.js'],
format: ['umd'],
plugins:[
babel({
presets: [['@babel/preset-env', {
useBuiltIns: 'usage',
corejs: '3',
modules: 'cjs',
loose: true,
targets: {
ie: '8',
browsers: '>2%'
}
}]],
"plugins": [
"add-module-exports"
]
})
],
outDir: 'dist/umd', // universal module definition
globalName: 'Bowser',
dts: false,