zhangyuang / ssr

A most advanced ssr framework support React17/React18/Vue2/Vue3 on Earth that implemented serverless-side render specification.
http://doc.ssr-fc.com/
MIT License
2.61k stars 284 forks source link

micro-app 的demo #118

Closed zandko closed 3 years ago

zandko commented 3 years ago

问题

micro-app的demo SEO 效果失效,节点只有 <div id="app"></div>, 这样显得做SSR的意义没了

<html lang="">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="/favicon.ico">
    <title>hello-world</title>
    <link href="/js/app.js" rel="preload" as="script"><link href="/js/chunk-vendors.js" rel="preload" as="script"></head>
    <body>
    <noscript>
    <strong>We're sorry but hello-world doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
    <script type="text/javascript" src="/js/chunk-vendors.js"></script><script type="text/javascript" src="/js/app.js"></script></body>
</html>

期望的结果

既可以实现微前端,又可以实现SSR(SEO)

当前使用的版本

https://github.com/zhangyuang/micro-app-ssr 官方demo

zhangyuang commented 3 years ago

micro-app不包含服务端,内容本来就是客户端动态拉取,seo的内容放在子应用本来就说明你的设计有问题。