This project was bootstrapped with Create React App.
In the project directory, you can run:
暴露 webpack 修改 webpack.config.js 使其支持 less
{
test: lessRegex,
exclude: lessModuleRegex,
use: getStyleLoaders(
{
importLoaders: 2,
sourceMap: isEnvProduction && shouldUseSourceMap,
},
'less-loader'
),
sideEffects: true,
},
{
test: lessModuleRegex,
use: getStyleLoaders(
{
importLoaders: 2,
sourceMap: isEnvProduction && shouldUseSourceMap,
modules: true,
getLocalIdent: getCSSModuleLocalIdent,
},
'less-loader'
),
},
安装 antd ui库
修改webpack
['import', {
libraryName: 'antd',
style: true
}],
less@3.x 有问题
需要修改 添加 { loader: 'less-loader', options: { javascriptEnabled: true } }
public 目录下 index.html 直接引入 script
yarn add echarts echarts-for-react
yarn add braft-editor
yarn add redux react-redux redux-devtools-extension