feat: add exports field and use bundled output by default (#9952)

This commit is contained in:
neverland 2021-11-27 18:52:47 +08:00 committed by GitHub
parent a302964a6a
commit 6ef286d370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 7 deletions

View File

@ -2,10 +2,22 @@
"name": "vant", "name": "vant",
"version": "3.3.1", "version": "3.3.1",
"description": "Mobile UI Components built on Vue", "description": "Mobile UI Components built on Vue",
"main": "lib/index.js", "main": "lib/vant.cjs.js",
"module": "es/index.js", "module": "lib/vant.es.js",
"style": "lib/index.css", "style": "lib/index.css",
"typings": "lib/index.d.ts", "typings": "lib/index.d.ts",
"unpkg": "lib/vant.min.js",
"jsdelivr": "lib/vant.min.js",
"exports": {
".": {
"import": "./lib/vant.es.js",
"require": "./lib/vant.cjs.js",
"types": "./lib/index.d.ts"
},
"./es/*": "./es/*",
"./lib/*": "./lib/*",
"./package.json": "./package.json"
},
"files": [ "files": [
"es", "es",
"lib", "lib",
@ -54,6 +66,7 @@
"devDependencies": { "devDependencies": {
"@vant/area-data": "^1.1.3", "@vant/area-data": "^1.1.3",
"@vant/cli": "workspace:*", "@vant/cli": "workspace:*",
"@vant/eslint-config": "workspace:*",
"@vue/compiler-sfc": "^3.2.20", "@vue/compiler-sfc": "^3.2.20",
"@vue/runtime-core": "^3.2.20", "@vue/runtime-core": "^3.2.20",
"@vue/test-utils": "^2.0.0-rc.16", "@vue/test-utils": "^2.0.0-rc.16",
@ -67,11 +80,9 @@
"*.css", "*.css",
"*.less" "*.less"
], ],
"web-types": "vetur/web-types.json",
"vetur": { "vetur": {
"tags": "vetur/tags.json", "tags": "vetur/tags.json",
"attributes": "vetur/attributes.json" "attributes": "vetur/attributes.json"
}, }
"web-types": "vetur/web-types.json",
"unpkg": "lib/vant.min.js",
"jsdelivr": "lib/vant.min.js"
} }

4
pnpm-lock.yaml generated
View File

@ -51,6 +51,7 @@ importers:
specifiers: specifiers:
'@vant/area-data': ^1.1.3 '@vant/area-data': ^1.1.3
'@vant/cli': workspace:* '@vant/cli': workspace:*
'@vant/eslint-config': workspace:*
'@vant/icons': ^1.7.1 '@vant/icons': ^1.7.1
'@vant/popperjs': ^1.1.0 '@vant/popperjs': ^1.1.0
'@vant/use': ^1.3.4 '@vant/use': ^1.3.4
@ -67,6 +68,7 @@ importers:
devDependencies: devDependencies:
'@vant/area-data': link:../vant-area-data '@vant/area-data': link:../vant-area-data
'@vant/cli': link:../vant-cli '@vant/cli': link:../vant-cli
'@vant/eslint-config': link:../vant-eslint-config
'@vue/compiler-sfc': 3.2.21 '@vue/compiler-sfc': 3.2.21
'@vue/runtime-core': 3.2.21 '@vue/runtime-core': 3.2.21
'@vue/test-utils': 2.0.0-rc.16_vue@3.2.21 '@vue/test-utils': 2.0.0-rc.16_vue@3.2.21
@ -6312,7 +6314,7 @@ packages:
mime-db: 1.50.0 mime-db: 1.50.0
/mime/1.6.0: /mime/1.6.0:
resolution: {integrity: sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=, tarball: mime/download/mime-1.6.0.tgz} resolution: {integrity: sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=, tarball: mime/download/mime-1.6.0.tgz?cache=0&sync_timestamp=1636738461596&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fmime%2Fdownload%2Fmime-1.6.0.tgz}
engines: {node: '>=4'} engines: {node: '>=4'}
hasBin: true hasBin: true
requiresBuild: true requiresBuild: true