mirror of
https://github.com/lancedikson/bowser
synced 2026-10-08 11:52:04 +00:00
chore: Install @rolldown/plugin-babel and update tsdown.config.ts
This commit is contained in:
@@ -54,6 +54,7 @@
|
|||||||
"@babel/eslint-parser": "^7.29.7",
|
"@babel/eslint-parser": "^7.29.7",
|
||||||
"@babel/preset-env": "^7.29.7",
|
"@babel/preset-env": "^7.29.7",
|
||||||
"@babel/register": "^7.29.7",
|
"@babel/register": "^7.29.7",
|
||||||
|
"@rolldown/plugin-babel": "0.2.3",
|
||||||
"ava": "^3.0.0",
|
"ava": "^3.0.0",
|
||||||
"babel-plugin-add-module-exports": "^1.0.4",
|
"babel-plugin-add-module-exports": "^1.0.4",
|
||||||
"babel-plugin-istanbul": "^8.0.0",
|
"babel-plugin-istanbul": "^8.0.0",
|
||||||
|
|||||||
26
pnpm-lock.yaml
generated
26
pnpm-lock.yaml
generated
@@ -23,6 +23,9 @@ importers:
|
|||||||
'@babel/register':
|
'@babel/register':
|
||||||
specifier: ^7.29.7
|
specifier: ^7.29.7
|
||||||
version: 7.29.7(@babel/core@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:
|
ava:
|
||||||
specifier: ^3.0.0
|
specifier: ^3.0.0
|
||||||
version: 3.15.0
|
version: 3.15.0
|
||||||
@@ -819,6 +822,23 @@ packages:
|
|||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [win32]
|
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':
|
'@rolldown/pluginutils@1.0.1':
|
||||||
resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==}
|
resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==}
|
||||||
|
|
||||||
@@ -4909,6 +4929,12 @@ snapshots:
|
|||||||
'@rolldown/binding-win32-x64-msvc@1.1.1':
|
'@rolldown/binding-win32-x64-msvc@1.1.1':
|
||||||
optional: true
|
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': {}
|
'@rolldown/pluginutils@1.0.1': {}
|
||||||
|
|
||||||
'@rtsao/scc@1.1.0': {}
|
'@rtsao/scc@1.1.0': {}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { defineConfig } from 'tsdown';
|
import { defineConfig } from 'tsdown';
|
||||||
|
import babel from '@rolldown/plugin-babel'
|
||||||
|
|
||||||
const banner = `Bowser - a browser detector
|
const banner = `Bowser - a browser detector
|
||||||
https://github.com/lancedikson/bowser
|
https://github.com/lancedikson/bowser
|
||||||
@@ -9,6 +10,23 @@ export default defineConfig([
|
|||||||
{
|
{
|
||||||
entry: ['src/bowser.js'],
|
entry: ['src/bowser.js'],
|
||||||
format: ['umd'],
|
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
|
outDir: 'dist/umd', // universal module definition
|
||||||
globalName: 'Bowser',
|
globalName: 'Bowser',
|
||||||
dts: false,
|
dts: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user