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: support mpa loader #3594

Merged
merged 3 commits into from
Sep 28, 2020
Merged

feat: support mpa loader #3594

merged 3 commits into from
Sep 28, 2020

Conversation

ClarkXia
Copy link
Collaborator

No description provided.

@ClarkXia ClarkXia requested a review from chenbin92 September 27, 2020 15:24

function mpaLoader() {
const options = getOptions(this) || {};
const renderModule = options.renderModule || 'rax';
Copy link
Collaborator

Choose a reason for hiding this comment

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

建议改为 framework 字段

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

function mpaLoader() {
const options = getOptions(this) || {};
const renderModule = options.renderModule || 'rax';
const withSSR = process.env.RAX_SSR === 'true';
Copy link
Collaborator

Choose a reason for hiding this comment

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

RAX_SSR 改为 __SSR_ENABLED__

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

appRender = `
const renderApp = async function() {
// process App.getInitialProps
if (withSSR && window.__INITIAL_DATA__ && window.__INITIAL_DATA__.pageData !== null) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

!== null 可以去掉 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

pageData 返回值为 null / object,暂不修改

@chenbin92 chenbin92 merged commit 407a679 into feat/rax-ssr Sep 28, 2020
@delete-merged-branch delete-merged-branch bot deleted the fix-mpa-loader branch September 28, 2020 04:24
ClarkXia added a commit that referenced this pull request Sep 28, 2020
* chore: bump version

* fix: catch debug webpackConfig error (#3541)

* fix: catch debug webpackConfig error

* fix: serializing object that contains cyclic object value

* chore: code optimize (#3549)

* chore: code optimize

* chore: bump version

* feat: support px2vw (#3546)

* feat: support px2vw

* docs: changelog.md update

* docs: package.json update

* docs: fusion.md add usePx2Vw option

* fix: remove use postcss-loader

* fix: ignore rules (#3544)

* docs: test guide (#3545)

* chore: bump version

* chore: bump version

* hotifx: store is undefined in class component (#3579)

* feat: support rax ssr

* chore: rename plugin ssr

* feat: support set the SSR in the build.json

* chore: reset code

* chore: bump version

* fix: eslint warnings (#3543)

* feat: call the getInitialData method of appConfig

* feat: support mode mpa of rax-app (#3575)

* feat: support mpa plugin

* fix: build-mpa-config

* fix: remove mpa-loader

* fix: entry error

* fix: ts config

* feat: support mpa ssr

* feat: support mpa loader (#3594)

* fix: update react-refresh-webpack-plugin version (#3558)

* feat: support set html in mpa mode (#3566)

* feat: support set html in mpa mode

* chore: update mpa example

* chore: code optimize

* chore: code optimize

* chore: update example

* chore: optional staticConfig

* fix: mpa loader in node env

* fix: command args

* fix: support weex mpa

* refactor: rename packages

* chore: dependency

* chore: code optimize

Co-authored-by: Yurisa <779509411@qq.com>
Co-authored-by: Hengchang Lu <44047106+luhc228@users.noreply.github.com>
Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
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.

2 participants