feat(build): umd 构建,支持 <script> 直接引入使用

This commit is contained in:
sight
2022-03-28 17:59:26 +08:00
parent 264866a007
commit e9389d00fe
4 changed files with 47 additions and 1 deletions

View File

@@ -6,6 +6,8 @@
"description": "a component library for Vue 3 base on layui-vue",
"homepage": "http://www.layui-vue.com",
"main": "es/index.js",
"unpkg": "umd/index.js",
"jsdelivr": "umd/index.js",
"types": "types/index.d.ts",
"style": "lib/index.css",
"keywords": [
@@ -22,9 +24,10 @@
},
"scripts": {
"dev": "vite example",
"build": "npm run build:all && npm run build:es && npm run build:types && npm run build:example",
"build": "npm run build:all && npm run build:es && npm run build:umd && npm run build:types && npm run build:example",
"build:es": "vite build --emptyOutDir --config ./script/build.es.ts",
"build:all": "vite build --emptyOutDir --config ./script/build.all.ts",
"build:umd": "vite build --emptyOutDir --config ./script/build.umd.ts",
"build:types": "rimraf types && tsc -d",
"build:example": "vite build example",
"lint:eslint": "eslint 'src/**/*.{vue,ts,tsx}' --fix",
@@ -85,6 +88,7 @@
"files": [
"lib",
"es",
"umd",
"types"
],
"browserslist": [