Lobos/react-ui

基于yo 构建的react项目,下载后无法引用实例

pikeCol opened this issue · 5 comments

image
点开后
image

代码
image

这个UI框架需要依赖的插件比较多,首先看你的报错,似乎是没有安装 sass-loadernode-sass,其次还需要安装 babel-plugin-react-require,并且需要在 .babelrc 中配置

 "plugins": [ "react-require" ]

这些在文档中都没有,需要开发者自己填坑。

目前我使用组件创建出的DOM都没有className,导致没有样式,不清楚你会不会也有这个问题,如果有类似问题,并有解决方案,麻烦告知一下

Lobos commented

这个命令会自动创建和安装依赖,并且有一个配置好的webpack.config文件

npm install rctui
node node_modules/rctui/cli/init.js [options]
options:
    - all        install dependencies and devDependencies package, simple demo code, devServer, webpack config
    - update     install / update package
    - demo       a simple demo
    - server     node devServer.js
    - webpack    webpack.config.js !warning: will overwrite your webpack.config.js file
Lobos commented

https://github.com/Lobos/react-example
这个项目是一个教程,可以参考一下

在yo构建的react脚手架 npm install rctui node node_modules/rctui/cli/init.js update 它会更改webpack.config.js 的配置

@baijunjie 目前没有更好的解决方案,我换了antd~感觉也不错