Skip to content

Commit

Permalink
feature: 打包组件库
Browse files Browse the repository at this point in the history
  • Loading branch information
jsxiaosi committed Jan 12, 2022
1 parent cba3109 commit c5a1af9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ const config = readdirSync(input)
name: 'index',
file: `${output}/${name}/index.js`,
format: 'umd',
globals: {
vue: 'vue', // 指明 global.vue 即是外部依赖 vue
},
},
}))
config.push({
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"files": [
"lib"
],
"main": "./lib/index.esm.js",
"main": "./lib/index.js",
"module": "./lib/index.esm.js",
"types": "./lib/index.d.ts",
"style": "./lib/theme-default/index.css",
"exports": {
".": {
"import": "./lib/index.esm.js",
"require": "./lib/index.esm.js"
"require": "./lib/index.js"
}
},
"workspaces": [
Expand Down

0 comments on commit c5a1af9

Please sign in to comment.