1.0.1 • Published 4 years ago
allen-ui v1.0.1
开发文档
npm run dev
开发环境npm run build
开发环境npm run deploy
部署
开发环境
- vscode、npm、webpack、eslint、prettier
FeatureList
- 输出
umd
格式文件,允许它和CommonJS/AMD/全局变量
一起工作 - 组件库支持按需加载,需要
babel
配置babel-plugin-component
插件 babel7\corejs3\runtime垫片
、babel polyfill
按需编译、不污染全局
踩坑记录
Vue
配置为externals
,打包时候排除掉、需要使用者自己安装
//webpack.deploy.js
externals: {
vue: {
root: 'Vue',
commonjs: 'vue',
commonjs2: 'vue',
amd: 'vue'
}
}
//packgage.json
peerDependencies: {
"vue": ">2.6.10"
}
TODOList
- 利用
rollUp
提供esm
包(webpack
输出格式不支持esm
)、方便使用者利用webpack
tree shaking
特性