Egg React Webpack 插件
exports.reactssr = {
enable: true,
package: 'egg-view-react-ssr'
};
- ${root}/config/plugin.local.js 开启 egg webpack react 本地开发辅助插件
exports.webpack = {
enable: true,
package: 'egg-webpack'
};
exports.webpackreact = {
enable: true,
package: 'egg-webpack-react'
};
- ${root}/config/config.local.js egg-webpack 插件本地配置,本地开发通过 egg-webpack 插件实现在 Egg 中进行 Webpack 构建
// ${root}/config/config.local.js
exports.webpack = { // 默认是如下配置,可不配置
browser: 'http://localhost:7001', // 配置 false 可以关闭自动打开浏览器
webpackConfigList: require('@easy-team/easywebpack-react').getWebpackConfig()
};
exports.reactssr = { // 默认不需要配置相关选项
};