Closed zandko closed 3 years ago
micro-app的demo SEO 效果失效,节点只有 <div id="app"></div>, 这样显得做SSR的意义没了
<div id="app"></div>
<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
micro-app不包含服务端,内容本来就是客户端动态拉取,seo的内容放在子应用本来就说明你的设计有问题。
问题
micro-app的demo SEO 效果失效,节点只有
<div id="app"></div>
, 这样显得做SSR的意义没了期望的结果
既可以实现微前端,又可以实现SSR(SEO)
当前使用的版本
https://github.com/zhangyuang/micro-app-ssr 官方demo