Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat user config #1253

Merged
merged 5 commits into from
Aug 15, 2019
Merged

Feat user config #1253

merged 5 commits into from
Aug 15, 2019

Conversation

Orange-C
Copy link
Collaborator

  1. all user config handled together
  2. add devServer config

@Orange-C Orange-C self-assigned this Aug 14, 2019
packages/rax-plugin-app/src/config/getWebpackBase.js Outdated Show resolved Hide resolved
packages/rax-plugin-app/src/config/getWebpackBase.js Outdated Show resolved Hide resolved
const { setBabelAlias } = require('rax-compile-config');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const { getBabelConfig, setBabelAlias } = require('rax-compile-config');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

webpack 的 config 是不是也可以提出去?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这份目前看只有app使用,如果未来其他plugin或者component那些都有了可以提

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SSR 的会复用这份 plugin 吧

@@ -108,8 +33,5 @@ module.exports = (context) => {
render: serverRender.renderToString,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么要从外面传一个 render 进去,而不是直接包掉这个逻辑

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

考虑到未来ice会使用react作为core的场景

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不如直接传 renderToString 方法

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不如直接传 renderToString 方法

字段名改成renderToString?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看了下已经内置了rax的createElement逻辑了,还是把这个逻辑内置了吧,我改一下

@Orange-C Orange-C merged commit d8e1f78 into feat-scripts0818 Aug 15, 2019
@delete-merged-branch delete-merged-branch bot deleted the feat-userConfig branch August 15, 2019 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants