Pu Wei
Pu Wei
gooooooooood!
you can figure out like this: ```javascript import NpmImport from 'less-plugin-npm-import'; import postcss from 'rollup-plugin-postcss'; export default { ...... plugins: [ postcss({ use: [['less', { plugins: [new NpmImport({prefix: '~'})], }]],...
> 用 `yarn create umi --library` 这样初始化更快吧。 用脚手架是要快一些,但那只是一个工具。这篇帖子偏向是教程,是想抛出一些点:让用户了解开发一个组件库的全貌,大概知道每一步完成的职责,应该注意什么。这是一个开头,稍后会对一些技术点,比如打包优化再进行深入。
update: 2019-03-07, 使用[umi-library](https://github.com/umijs/umi/tree/master/packages/umi-library)重构,更加小巧更加优雅。
@jyzwf 稍后会有 pr 将一些常用 babel 插件集成。
你安装依赖是怎么安装的? 使用 yarn install https://github.com/umijs/umi/issues/2072
@fohui 你好,umi-library 现在已升级为 https://github.com/umijs/father
这应该是预期的结果,eslint 检查出一个错误,然后抛出来
这个地址不存在吗?
有一个 issue 在跟进中,但现在还没有实现,我会继续关注。 https://github.com/whatwg/fetch/issues/607