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 without document file #546

Merged
merged 6 commits into from
Dec 24, 2020
Merged

Conversation

SoloJiang
Copy link
Contributor

No description provided.

@@ -180,12 +203,23 @@ async function generateHtml(compilation, options) {
const files = compilation.entrypoints.get(entryName).getFiles();
const assets = getAssetsForPage(files, publicPath);
const documentContent = compilation.assets[`${tempFile}.js`].source();

let pageSource;

try {
const Document: any = loadDocument(documentContent);
Copy link
Contributor

Choose a reason for hiding this comment

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

无 document 场景这个逻辑需要吗

Copy link
Contributor Author

Choose a reason for hiding this comment

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

无 document 场景下,因为存在静态构建,所以依然需要这个逻辑

@@ -0,0 +1,16 @@
export default function getBuiltInHtmlTpl(htmlInfo) {
Copy link
Contributor

Choose a reason for hiding this comment

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

跟 rax-web 中维护的模版是重复的?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

嗯,模板部分重复,后续改造计划另开 issue

@SoloJiang SoloJiang merged commit 279aa95 into release-next Dec 24, 2020
@SoloJiang SoloJiang deleted the feat/no-document branch December 24, 2020 06:01
SoloJiang added a commit that referenced this pull request Dec 24, 2020
* chore: bump version

* chore: update version

* chore: migrate plugin-ssr (#540)

* chore: migrate plugin-ssr

* chore: update references

* fix: kraken mpa error (#541)

* feat: support cloud IDE (#542)

* feat: support cloud IDE

* chore: typo

* chore: change pha get url prefix method

* chore: remove useless change

* feat(miniapp): supoort set entry when using subpackages (#532)

* refactor(miniapp): optimize entry name in runtime miniapp (#544)

* feat: support without document file (#546)

* feat: support without document file

* fix: generate html

* feat: ssr

* chore: remove useless version

* chore: change config (#548)

* chore: change config

* chore: remove unused code

* chore: bump version (#550)

* chore: bump version

* chore: bump version

* chore: update miniapp version

Co-authored-by: Hengchang Lu <44047106+luhc228@users.noreply.github.com>
Co-authored-by: NK <yxy0919@foxmail.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