Skip to content
This repository was archived by the owner on May 9, 2020. It is now read-only.

Conversation

@chenbin92
Copy link
Contributor

fix issue: #122

@chenbin92 chenbin92 changed the base branch from master to release-next March 25, 2020 15:43
@chenbin92 chenbin92 requested review from ClarkXia and imsobear March 25, 2020 15:43
@chenbin92
Copy link
Contributor Author

chenbin92 commented Mar 25, 2020

@ClarkXia 主要思路是把 module.ts => module.ts.ejs,然后区分 staticModule 和 runtimeModule 的调用时机

@chenbin92 chenbin92 self-assigned this Mar 25, 2020
@chenbin92 chenbin92 added this to the 03.23 ~ 03.27 milestone Mar 25, 2020
@chenbin92 chenbin92 added the enhancement New feature or request label Mar 25, 2020
const rendererContent = ejs.render(moduleContent);
const pkgPath = path.join(pluginPath, '../../package.json');
const { moduleConfig } = fse.readJSONSync(pkgPath);
const moduleFolderName = moduleConfig && moduleConfig.folderName ? moduleConfig.folderName : 'module';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

这里需要看下是在 package.json 中约定导出的文件名还是都导出到 module 目录下

@ClarkXia
Copy link
Contributor

可以验证下 request module 加载提前的情况下,是不是可以达到类似的效果。
另外基于这种方式的做法还有一个弊端就是如果 app.js 中导入其他文件,这些文件依旧不能在执行方法外直接享受 request 的配置

@chenbin92 chenbin92 merged commit 0ceed05 into release-next Mar 27, 2020
@chenbin92 chenbin92 deleted the feat/enhance-request branch March 27, 2020 08:43
imsobear added a commit that referenced this pull request Mar 27, 2020
imsobear added a commit that referenced this pull request Mar 27, 2020
* Revert "Feat/enhance request (#161)"

This reverts commit 0ceed05.

* v1.1.3-alpha.3
chenbin92 pushed a commit that referenced this pull request Mar 30, 2020
* chore: release version

* fix: semicolons is required (#162)

* chore: fallback example (#169)

* fix: onHook position (#173)

* chore: version

* v1.1.3-alpha.0

* fix: pass location params to StaticRouter (#176)

* fix: pass location params

* fix: context params

* chore: code optimization

* fix: pass staticRouter context

* Feat/enhance request (#161)

* feat: enhance request

* refactor: load module time (#174)

* refactor: load module

Co-authored-by: ClarkXia <xiawenwu41@gmail.com>

* feat: downgraded to csr when ssr error (#179)

* fix: define process.env.APP_MODE in ssr (#181)

* fix: define process.env.APP_MODE in ssr

* fix: modify define plugin

Co-authored-by: 大果 <sobear.me@gmail.com>

* fix: publish script (#180)

* v1.1.3-alpha.1

* fix: ssr to csr (#182)

* fix: use window variable

* chore: typo

* fix: remove define variables

* refactor: server render

* v1.1.3-alpha.2

* chore: fix lint (#183)

* chore: update example

* fix: params

* chore: revert beforeload (#185)

* Revert "Feat/enhance request (#161)"

This reverts commit 0ceed05.

* v1.1.3-alpha.3

* feat: support runtime app_mode (#189)

* feat: support runtime app_mode

* feat: support process.env.SERVER_PORT

* fix: lock core-js version (#184)

* fix: lint error (#190)

* feat: add static module (#188)

* fix: set polyfill

* fix: before load module

* fix: load module in createApp

* chore: rename variable

* feat: support uglify

* refactor: code optim

* fix: window is not defined (#193)

* v1.1.3-alpha.4

* v1.1.3
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants