1
0
mirror of https://github.com/lancedikson/bowser synced 2026-09-22 12:05:23 +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

@@ -54,6 +54,7 @@
"@babel/eslint-parser": "^7.29.7",
"@babel/preset-env": "^7.29.7",
"@babel/register": "^7.29.7",
"@rolldown/plugin-babel": "0.2.3",
"ava": "^3.0.0",
"babel-plugin-add-module-exports": "^1.0.4",
"babel-plugin-istanbul": "^8.0.0",

26
pnpm-lock.yaml generated
View File

@@ -23,6 +23,9 @@ importers:
'@babel/register':
specifier: ^7.29.7
version: 7.29.7(@babel/core@7.29.7)
'@rolldown/plugin-babel':
specifier: 0.2.3
version: 0.2.3(@babel/core@7.29.7)(rolldown@1.1.1)
ava:
specifier: ^3.0.0
version: 3.15.0
@@ -819,6 +822,23 @@ packages:
cpu: [x64]
os: [win32]
'@rolldown/plugin-babel@0.2.3':
resolution: {integrity: sha512-+zEk16yGlz1F9STiRr6uG9hmIXb6nprjLczV/htGptYuLoCuxb+itZ03RKCEeOhBpDDd1NU7qF6x1VLMUp62bw==}
engines: {node: '>=22.12.0 || ^24.0.0'}
peerDependencies:
'@babel/core': ^7.29.0 || ^8.0.0-rc.1
'@babel/plugin-transform-runtime': ^7.29.0 || ^8.0.0-rc.1
'@babel/runtime': ^7.27.0 || ^8.0.0-rc.1
rolldown: ^1.0.0-rc.5
vite: ^8.0.0
peerDependenciesMeta:
'@babel/plugin-transform-runtime':
optional: true
'@babel/runtime':
optional: true
vite:
optional: true
'@rolldown/pluginutils@1.0.1':
resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==}
@@ -4909,6 +4929,12 @@ snapshots:
'@rolldown/binding-win32-x64-msvc@1.1.1':
optional: true
'@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7)(rolldown@1.1.1)':
dependencies:
'@babel/core': 7.29.7
picomatch: 4.0.4
rolldown: 1.1.1
'@rolldown/pluginutils@1.0.1': {}
'@rtsao/scc@1.1.0': {}

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,