@nbfe/react-cli
v1.0.9
Published
React CLI
Downloads
5
Readme
使用
npm i -D @nbfe/react-cli
命令行
- npx react-cli serve // 启动开发服务器
- npx react-cli build // 生产环境下构建
- npx react-cli inspect // 检查内部 webpack 配置
api 调用
const { getWebpackConfig } = require('@nbfe/react-cli')
const webpackConfig = getWebpackConfig(false)
react.config.js
module.exports = config => {
const { isDevelopment, isMac, ipAddress } = config
return {
devServer: {
port: 3000
},
dllEntry: {
vendor: ['react', 'react-dom']
}
}
}