chore(vant-use): use Rslib to build (#13250)

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

View File

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

View File

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

View File

@ -2,14 +2,15 @@
"name": "@vant/use",
"version": "1.6.0",
"description": "Vant Composition API",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.mjs",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"typings": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.esm.mjs",
"require": "./dist/index.cjs.js"
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"sideEffects": false,
@ -17,11 +18,8 @@
"dist"
],
"scripts": {
"clean": "rimraf ./dist",
"dev": "node ./build.js -w",
"build:types": "tsc -p ./tsconfig.json --emitDeclarationOnly",
"build:bundle": "node ./build.js",
"build": "pnpm clean && pnpm build:bundle && pnpm build:types",
"dev": "rslib dev",
"build": "rslib build",
"release": "vant-cli release",
"prepare": "pnpm build"
},
@ -38,8 +36,8 @@
"author": "chenjiahan",
"license": "MIT",
"devDependencies": {
"@rslib/core": "^0.1.3",
"esbuild": "^0.24.0",
"rimraf": "^6.0.1",
"typescript": "^5.7.2",
"vue": "^3.5.13"
},

View File

@ -0,0 +1,11 @@
import { defineConfig } from '@rslib/core';
export default defineConfig({
lib: [
{ format: 'esm', syntax: ['Chrome 53'], dts: true },
{ format: 'cjs', syntax: ['Chrome 53'] },
],
output: {
target: 'web',
},
});

6
pnpm-lock.yaml generated
View File

@ -346,12 +346,12 @@ importers:
packages/vant-use:
devDependencies:
'@rslib/core':
specifier: ^0.1.3
version: 0.1.3(typescript@5.7.2)
esbuild:
specifier: ^0.24.0
version: 0.24.0
rimraf:
specifier: ^6.0.1
version: 6.0.1
typescript:
specifier: ^5.7.2
version: 5.7.2