chore(auto-import): use Rslib to build (#13249)

This commit is contained in:
neverland 2024-12-08 09:12:34 +08:00 committed by GitHub
parent b7a9188be4
commit 3884730c4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 149 additions and 28 deletions

View File

@ -1 +0,0 @@
require('../vant-use/build');

View File

@ -1,15 +1,16 @@
{ {
"name": "@vant/auto-import-resolver", "name": "@vant/auto-import-resolver",
"version": "1.2.1", "version": "1.2.1",
"type": "module",
"description": "Vant auto import resolver based on unplugin-vue-components", "description": "Vant auto import resolver based on unplugin-vue-components",
"main": "dist/index.cjs.js", "main": "dist/index.cjs",
"module": "dist/index.esm.mjs", "module": "dist/index.js",
"typings": "dist/index.d.ts", "typings": "dist/index.d.ts",
"exports": { "exports": {
".": { ".": {
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
"import": "./dist/index.esm.mjs", "import": "./dist/index.js",
"require": "./dist/index.cjs.js" "require": "./dist/index.cjs"
} }
}, },
"sideEffects": false, "sideEffects": false,
@ -17,13 +18,10 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"clean": "rimraf ./dist", "dev": "rslib dev",
"dev": "node ./build.js -w", "build": "rslib build",
"build:types": "tsc -p ./tsconfig.json --emitDeclarationOnly",
"build:bundle": "node ./build.js",
"build": "pnpm clean && pnpm build:bundle && pnpm build:types",
"release": "vant-cli release", "release": "vant-cli release",
"prepare": "pnpm build" "prepublishOnly": "pnpm build"
}, },
"publishConfig": { "publishConfig": {
"access": "public", "access": "public",
@ -39,7 +37,7 @@
"author": "chenjiahan", "author": "chenjiahan",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"rimraf": "^6.0.1", "@rslib/core": "^0.1.3",
"typescript": "^5.7.2" "typescript": "^5.7.2"
} }
} }

View File

@ -0,0 +1,8 @@
import { defineConfig } from '@rslib/core';
export default defineConfig({
lib: [
{ format: 'esm', syntax: 'es2021', dts: true },
{ format: 'cjs', syntax: 'es2021' },
],
});

View File

@ -1 +0,0 @@
require('../vant-use/build');

View File

@ -33,7 +33,7 @@
"author": "chenjiahan", "author": "chenjiahan",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@rslib/core": "^0.1.1", "@rslib/core": "^0.1.3",
"@vue/runtime-core": "^3.5.13", "@vue/runtime-core": "^3.5.13",
"typescript": "^5.7.2", "typescript": "^5.7.2",
"vant": "workspace:*", "vant": "workspace:*",

145
pnpm-lock.yaml generated
View File

@ -139,9 +139,9 @@ importers:
packages/vant-auto-import-resolver: packages/vant-auto-import-resolver:
devDependencies: devDependencies:
rimraf: '@rslib/core':
specifier: ^6.0.1 specifier: ^0.1.3
version: 6.0.1 version: 0.1.3(typescript@5.7.2)
typescript: typescript:
specifier: ^5.7.2 specifier: ^5.7.2
version: 5.7.2 version: 5.7.2
@ -288,8 +288,8 @@ importers:
packages/vant-compat: packages/vant-compat:
devDependencies: devDependencies:
'@rslib/core': '@rslib/core':
specifier: ^0.1.1 specifier: ^0.1.3
version: 0.1.1(typescript@5.7.2) version: 0.1.3(typescript@5.7.2)
'@vue/runtime-core': '@vue/runtime-core':
specifier: ^3.5.13 specifier: ^3.5.13
version: 3.5.13 version: 3.5.13
@ -1014,6 +1014,11 @@ packages:
engines: {node: '>=16.7.0'} engines: {node: '>=16.7.0'}
hasBin: true hasBin: true
'@rsbuild/core@1.1.9':
resolution: {integrity: sha512-mHZveEwlTtW9nxWa+T0xUm6ssm+HkDYZ0NENLfWMUmsL0LjMJrpQzRlbD+p5+9Uf+KXUo3Dbtv0ScA+p7cuGTg==}
engines: {node: '>=16.7.0'}
hasBin: true
'@rsbuild/plugin-babel@1.0.3': '@rsbuild/plugin-babel@1.0.3':
resolution: {integrity: sha512-3S/ykXv7KRo0FxVpkjoHFUwB04nKINIET1kuv4xiRaDmeww1Tp0wl9h4u8a7d7gU/4FllyoUflY8TVhci/o05g==} resolution: {integrity: sha512-3S/ykXv7KRo0FxVpkjoHFUwB04nKINIET1kuv4xiRaDmeww1Tp0wl9h4u8a7d7gU/4FllyoUflY8TVhci/o05g==}
peerDependencies: peerDependencies:
@ -1042,8 +1047,8 @@ packages:
peerDependencies: peerDependencies:
'@rsbuild/core': 1.x '@rsbuild/core': 1.x
'@rslib/core@0.1.1': '@rslib/core@0.1.3':
resolution: {integrity: sha512-D/zCLzhNNM7DkuR/XNVFyB9er8OpmBpSJZQYeQgjuShg+JtXTWYX/DbmTniHpeO9B0ydMFS84WFO9ZAzGlDd6A==} resolution: {integrity: sha512-M4P5KSGKWJZyB0zIMeHTBXqk9Uk7ZQB9fxxd8JJFMYhCiTBkx0zoA69XICyjFzgKLQ6sEGfbISnXNPLuLLgflg==}
engines: {node: '>=16.0.0'} engines: {node: '>=16.0.0'}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
@ -1060,49 +1065,97 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [darwin] os: [darwin]
'@rspack/binding-darwin-arm64@1.1.5':
resolution: {integrity: sha512-eEynmyPPl+OGYQ9LRFwiQosyRfcca3OQB73akqY4mqDRl39OyiBjq7347DLHJysgbm9z+B1bsiLuh2xc6mdclQ==}
cpu: [arm64]
os: [darwin]
'@rspack/binding-darwin-x64@1.1.4': '@rspack/binding-darwin-x64@1.1.4':
resolution: {integrity: sha512-ECmcTJecXwqhqqpOjfjIcwDp8UqJ3D1Crc2COG+wUfwejtbqs9twUTaufZz7U7xna+oyfJ4GRNSKS9xs4N2kPQ==} resolution: {integrity: sha512-ECmcTJecXwqhqqpOjfjIcwDp8UqJ3D1Crc2COG+wUfwejtbqs9twUTaufZz7U7xna+oyfJ4GRNSKS9xs4N2kPQ==}
cpu: [x64] cpu: [x64]
os: [darwin] os: [darwin]
'@rspack/binding-darwin-x64@1.1.5':
resolution: {integrity: sha512-I6HPRgogewU5v1OKe3noEzq2U1FCEYAbW+smy+lPvpTW+3X6PlVMzTT4oelhB0EXDQ+KxjXH9KpOKON1hg/JGg==}
cpu: [x64]
os: [darwin]
'@rspack/binding-linux-arm64-gnu@1.1.4': '@rspack/binding-linux-arm64-gnu@1.1.4':
resolution: {integrity: sha512-QVRFV6+z1DopeGn8rLRbBNrWXuBvp7J19lTtvx9F5mItzTiBVHmNqFt31namm59xkhHJ3leng7l2F39qcOMOIA==} resolution: {integrity: sha512-QVRFV6+z1DopeGn8rLRbBNrWXuBvp7J19lTtvx9F5mItzTiBVHmNqFt31namm59xkhHJ3leng7l2F39qcOMOIA==}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
'@rspack/binding-linux-arm64-gnu@1.1.5':
resolution: {integrity: sha512-LQnqucNa6Dr6y3By+/M2ARO4jDR3AM+PuCsHgzlYT0RDRLS+Ow3f50WbNBf7eI/DhrEA0aucYL3sz1ljguB3EA==}
cpu: [arm64]
os: [linux]
'@rspack/binding-linux-arm64-musl@1.1.4': '@rspack/binding-linux-arm64-musl@1.1.4':
resolution: {integrity: sha512-UCateQWfEpEyFOC/tkuicXpIm81s5DavcwKjX3wwh1JB/KO6UxGHK8F75BV4K3Coo/UEiNCvL8xrB7eDjMDwYg==} resolution: {integrity: sha512-UCateQWfEpEyFOC/tkuicXpIm81s5DavcwKjX3wwh1JB/KO6UxGHK8F75BV4K3Coo/UEiNCvL8xrB7eDjMDwYg==}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
'@rspack/binding-linux-arm64-musl@1.1.5':
resolution: {integrity: sha512-b9L/9HJxrWY4cezPWqgj28I9Xe2XxwLHu8x0CMGobwF2XKR0QQVLAst38RW/EusJ8TURdyvNEOuRZlWEIJuYOw==}
cpu: [arm64]
os: [linux]
'@rspack/binding-linux-x64-gnu@1.1.4': '@rspack/binding-linux-x64-gnu@1.1.4':
resolution: {integrity: sha512-Nz5Bt1PDxebVRU321h9AGkLRQL5n9Xgt+rluWAXLVtyxM9aPavmvu1n6/G9stXwQdnUVrZIUs7EzhIhWBe5R/A==} resolution: {integrity: sha512-Nz5Bt1PDxebVRU321h9AGkLRQL5n9Xgt+rluWAXLVtyxM9aPavmvu1n6/G9stXwQdnUVrZIUs7EzhIhWBe5R/A==}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
'@rspack/binding-linux-x64-gnu@1.1.5':
resolution: {integrity: sha512-0az52ZXTg/ErCGC1v/oFLWByKAiXvng4euv+prwMWF6p1pA7lfLRLzdibDFO4KgC16Zlfcg3hqs7YikLng4x+w==}
cpu: [x64]
os: [linux]
'@rspack/binding-linux-x64-musl@1.1.4': '@rspack/binding-linux-x64-musl@1.1.4':
resolution: {integrity: sha512-1XG795a+M4vE7JLyeDa1oktr4WU/I5IQ9d8Vk3PVtF59IxnKpjOb3vdGhXP7Ke2zWP6C2YQzWotez6AbO3uWeA==} resolution: {integrity: sha512-1XG795a+M4vE7JLyeDa1oktr4WU/I5IQ9d8Vk3PVtF59IxnKpjOb3vdGhXP7Ke2zWP6C2YQzWotez6AbO3uWeA==}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
'@rspack/binding-linux-x64-musl@1.1.5':
resolution: {integrity: sha512-EF/LJTtCTkuti2gJnCyvXHC5Q2L5M4+RXm5kj9Bfu/t0Zmmfe6Jd5QUsifgogioeL0ZsH/Pou5QiiVcOFcqFKQ==}
cpu: [x64]
os: [linux]
'@rspack/binding-win32-arm64-msvc@1.1.4': '@rspack/binding-win32-arm64-msvc@1.1.4':
resolution: {integrity: sha512-1hXOgHxnrBmjBNUluy9MbFMQi4lnAS199JD5UHRc2mx5i+D8cjAiBsWHzIcK4xzsxu2IYgVGsJcdIA8/zV/PVQ==} resolution: {integrity: sha512-1hXOgHxnrBmjBNUluy9MbFMQi4lnAS199JD5UHRc2mx5i+D8cjAiBsWHzIcK4xzsxu2IYgVGsJcdIA8/zV/PVQ==}
cpu: [arm64] cpu: [arm64]
os: [win32] os: [win32]
'@rspack/binding-win32-arm64-msvc@1.1.5':
resolution: {integrity: sha512-VEqhK6HwIHby6gtOkxIx66SkqYndiaP1ddZ3X39RLE40TY3KlNgfG/SzbN9J5Qb+8jjq3ogV8n50+wLEGkhiWw==}
cpu: [arm64]
os: [win32]
'@rspack/binding-win32-ia32-msvc@1.1.4': '@rspack/binding-win32-ia32-msvc@1.1.4':
resolution: {integrity: sha512-Jfq6gF5QKOYZsgDYRx+fWipDHmtHxq6jniws1WAE8F5w1qIt/dAHzW3a6+3VwCih9lQEEH3Rimy/ECB0oergng==} resolution: {integrity: sha512-Jfq6gF5QKOYZsgDYRx+fWipDHmtHxq6jniws1WAE8F5w1qIt/dAHzW3a6+3VwCih9lQEEH3Rimy/ECB0oergng==}
cpu: [ia32] cpu: [ia32]
os: [win32] os: [win32]
'@rspack/binding-win32-ia32-msvc@1.1.5':
resolution: {integrity: sha512-Yi2BwYehc5/sRVgI7zTGYJKjnV8UszAJt/stWdFHaq82chHiuuF/tQd1WcBUq0Iin9ylBMo16mRJAuFkFmJ74Q==}
cpu: [ia32]
os: [win32]
'@rspack/binding-win32-x64-msvc@1.1.4': '@rspack/binding-win32-x64-msvc@1.1.4':
resolution: {integrity: sha512-d9HUGVfNFhB+r32kDPkzHeMmgwemTFsDymnWJUgUrojzTJ326JrDmEXVeCnAHfwBSC9w4/mp4H+4iGhIdKSo9w==} resolution: {integrity: sha512-d9HUGVfNFhB+r32kDPkzHeMmgwemTFsDymnWJUgUrojzTJ326JrDmEXVeCnAHfwBSC9w4/mp4H+4iGhIdKSo9w==}
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
'@rspack/binding-win32-x64-msvc@1.1.5':
resolution: {integrity: sha512-4UArXYqJO1Ni7TmCw1T11JnrwfpoThDdiQ9k1P1voBWK3bDahPEBOptk9ZPu2+ZuRX8hFrvumRKkLY3oy7fTMw==}
cpu: [x64]
os: [win32]
'@rspack/binding@1.1.4': '@rspack/binding@1.1.4':
resolution: {integrity: sha512-XdR/4DACpLqNjxEw+ikg5FN2dQbOAxj7fDlndNio0l+m8ThPiIsetkJ2FNSlxt/K4SVnIrwAkhE5kabVNKR4EA==} resolution: {integrity: sha512-XdR/4DACpLqNjxEw+ikg5FN2dQbOAxj7fDlndNio0l+m8ThPiIsetkJ2FNSlxt/K4SVnIrwAkhE5kabVNKR4EA==}
'@rspack/binding@1.1.5':
resolution: {integrity: sha512-RsSkgi56Q5XUXut0qweLSE1C4Ogcm7g/ueKoOgsbHAYVKrCs9/dTFlPHWSIAaI7QWh0GWEePR/MM2O2HIu+1rw==}
'@rspack/core@1.1.4': '@rspack/core@1.1.4':
resolution: {integrity: sha512-JUU1pS11TY3/MwnezBfLLp3+7zfkd4Adzo8Pv4f4R1KoJyX1FYBFBcKnfZBlaGYi2C2e5ZDrrHxQlrPmygjbuw==} resolution: {integrity: sha512-JUU1pS11TY3/MwnezBfLLp3+7zfkd4Adzo8Pv4f4R1KoJyX1FYBFBcKnfZBlaGYi2C2e5ZDrrHxQlrPmygjbuw==}
engines: {node: '>=16.0.0'} engines: {node: '>=16.0.0'}
@ -1112,6 +1165,15 @@ packages:
'@swc/helpers': '@swc/helpers':
optional: true optional: true
'@rspack/core@1.1.5':
resolution: {integrity: sha512-/FmxDeMuW8fJkhz8fHuCu7OiJHFKW78xclEu7LkEujWl4PqJgdWjUL/6FWIj50spRwj6PRfuc31hFSL4hbNfCA==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@swc/helpers': '>=0.5.1'
peerDependenciesMeta:
'@swc/helpers':
optional: true
'@rspack/lite-tapable@1.0.1': '@rspack/lite-tapable@1.0.1':
resolution: {integrity: sha512-VynGOEsVw2s8TAlLf/uESfrgfrq2+rcXB1muPJYBWbsm1Oa6r5qVQhjA5ggM6z/coYPrsVMgovl3Ff7Q7OCp1w==} resolution: {integrity: sha512-VynGOEsVw2s8TAlLf/uESfrgfrq2+rcXB1muPJYBWbsm1Oa6r5qVQhjA5ggM6z/coYPrsVMgovl3Ff7Q7OCp1w==}
engines: {node: '>=16.0.0'} engines: {node: '>=16.0.0'}
@ -2474,8 +2536,8 @@ packages:
rrweb-cssom@0.7.1: rrweb-cssom@0.7.1:
resolution: {integrity: sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==} resolution: {integrity: sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==}
rsbuild-plugin-dts@0.1.1: rsbuild-plugin-dts@0.1.3:
resolution: {integrity: sha512-pm0tVPioQGaF8O50S9j51oAjIVfM0Sn0+BteZ1TIv5t3cBdQmI9dmd15YJERrwsZAAUPAtuwIWM1TmEGH2m4zQ==} resolution: {integrity: sha512-a2O1U7LnzW9+53A7+DXvGhAgmZdmi07Cu12CkCcP9uMcOu5dnFR5JlFPVCN/se5P9h32bGnUJ0bKqR8UrLmJxA==}
engines: {node: '>=16.0.0'} engines: {node: '>=16.0.0'}
peerDependencies: peerDependencies:
'@microsoft/api-extractor': ^7 '@microsoft/api-extractor': ^7
@ -3650,6 +3712,13 @@ snapshots:
'@swc/helpers': 0.5.15 '@swc/helpers': 0.5.15
core-js: 3.39.0 core-js: 3.39.0
'@rsbuild/core@1.1.9':
dependencies:
'@rspack/core': 1.1.5(@swc/helpers@0.5.15)
'@rspack/lite-tapable': 1.0.1
'@swc/helpers': 0.5.15
core-js: 3.39.0
'@rsbuild/plugin-babel@1.0.3(@rsbuild/core@1.1.7)': '@rsbuild/plugin-babel@1.0.3(@rsbuild/core@1.1.7)':
dependencies: dependencies:
'@babel/core': 7.26.0 '@babel/core': 7.26.0
@ -3703,10 +3772,10 @@ snapshots:
- vue - vue
- webpack-cli - webpack-cli
'@rslib/core@0.1.1(typescript@5.7.2)': '@rslib/core@0.1.3(typescript@5.7.2)':
dependencies: dependencies:
'@rsbuild/core': 1.1.7 '@rsbuild/core': 1.1.9
rsbuild-plugin-dts: 0.1.1(@rsbuild/core@1.1.7)(typescript@5.7.2) rsbuild-plugin-dts: 0.1.3(@rsbuild/core@1.1.9)(typescript@5.7.2)
tinyglobby: 0.2.10 tinyglobby: 0.2.10
optionalDependencies: optionalDependencies:
typescript: 5.7.2 typescript: 5.7.2
@ -3714,30 +3783,57 @@ snapshots:
'@rspack/binding-darwin-arm64@1.1.4': '@rspack/binding-darwin-arm64@1.1.4':
optional: true optional: true
'@rspack/binding-darwin-arm64@1.1.5':
optional: true
'@rspack/binding-darwin-x64@1.1.4': '@rspack/binding-darwin-x64@1.1.4':
optional: true optional: true
'@rspack/binding-darwin-x64@1.1.5':
optional: true
'@rspack/binding-linux-arm64-gnu@1.1.4': '@rspack/binding-linux-arm64-gnu@1.1.4':
optional: true optional: true
'@rspack/binding-linux-arm64-gnu@1.1.5':
optional: true
'@rspack/binding-linux-arm64-musl@1.1.4': '@rspack/binding-linux-arm64-musl@1.1.4':
optional: true optional: true
'@rspack/binding-linux-arm64-musl@1.1.5':
optional: true
'@rspack/binding-linux-x64-gnu@1.1.4': '@rspack/binding-linux-x64-gnu@1.1.4':
optional: true optional: true
'@rspack/binding-linux-x64-gnu@1.1.5':
optional: true
'@rspack/binding-linux-x64-musl@1.1.4': '@rspack/binding-linux-x64-musl@1.1.4':
optional: true optional: true
'@rspack/binding-linux-x64-musl@1.1.5':
optional: true
'@rspack/binding-win32-arm64-msvc@1.1.4': '@rspack/binding-win32-arm64-msvc@1.1.4':
optional: true optional: true
'@rspack/binding-win32-arm64-msvc@1.1.5':
optional: true
'@rspack/binding-win32-ia32-msvc@1.1.4': '@rspack/binding-win32-ia32-msvc@1.1.4':
optional: true optional: true
'@rspack/binding-win32-ia32-msvc@1.1.5':
optional: true
'@rspack/binding-win32-x64-msvc@1.1.4': '@rspack/binding-win32-x64-msvc@1.1.4':
optional: true optional: true
'@rspack/binding-win32-x64-msvc@1.1.5':
optional: true
'@rspack/binding@1.1.4': '@rspack/binding@1.1.4':
optionalDependencies: optionalDependencies:
'@rspack/binding-darwin-arm64': 1.1.4 '@rspack/binding-darwin-arm64': 1.1.4
@ -3750,6 +3846,18 @@ snapshots:
'@rspack/binding-win32-ia32-msvc': 1.1.4 '@rspack/binding-win32-ia32-msvc': 1.1.4
'@rspack/binding-win32-x64-msvc': 1.1.4 '@rspack/binding-win32-x64-msvc': 1.1.4
'@rspack/binding@1.1.5':
optionalDependencies:
'@rspack/binding-darwin-arm64': 1.1.5
'@rspack/binding-darwin-x64': 1.1.5
'@rspack/binding-linux-arm64-gnu': 1.1.5
'@rspack/binding-linux-arm64-musl': 1.1.5
'@rspack/binding-linux-x64-gnu': 1.1.5
'@rspack/binding-linux-x64-musl': 1.1.5
'@rspack/binding-win32-arm64-msvc': 1.1.5
'@rspack/binding-win32-ia32-msvc': 1.1.5
'@rspack/binding-win32-x64-msvc': 1.1.5
'@rspack/core@1.1.4(@swc/helpers@0.5.15)': '@rspack/core@1.1.4(@swc/helpers@0.5.15)':
dependencies: dependencies:
'@module-federation/runtime-tools': 0.5.1 '@module-federation/runtime-tools': 0.5.1
@ -3759,6 +3867,15 @@ snapshots:
optionalDependencies: optionalDependencies:
'@swc/helpers': 0.5.15 '@swc/helpers': 0.5.15
'@rspack/core@1.1.5(@swc/helpers@0.5.15)':
dependencies:
'@module-federation/runtime-tools': 0.5.1
'@rspack/binding': 1.1.5
'@rspack/lite-tapable': 1.0.1
caniuse-lite: 1.0.30001664
optionalDependencies:
'@swc/helpers': 0.5.15
'@rspack/lite-tapable@1.0.1': {} '@rspack/lite-tapable@1.0.1': {}
'@swc/helpers@0.5.15': '@swc/helpers@0.5.15':
@ -5308,9 +5425,9 @@ snapshots:
rrweb-cssom@0.7.1: {} rrweb-cssom@0.7.1: {}
rsbuild-plugin-dts@0.1.1(@rsbuild/core@1.1.7)(typescript@5.7.2): rsbuild-plugin-dts@0.1.3(@rsbuild/core@1.1.9)(typescript@5.7.2):
dependencies: dependencies:
'@rsbuild/core': 1.1.7 '@rsbuild/core': 1.1.9
magic-string: 0.30.14 magic-string: 0.30.14
picocolors: 1.1.1 picocolors: 1.1.1
tinyglobby: 0.2.10 tinyglobby: 0.2.10