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

[frontend-gray]插件支持在特定Path下返回指定HTML #1349

Open
Hazel0928 opened this issue Sep 27, 2024 · 2 comments
Open

[frontend-gray]插件支持在特定Path下返回指定HTML #1349

Hazel0928 opened this issue Sep 27, 2024 · 2 comments

Comments

@Hazel0928
Copy link
Contributor

Why do you need it?

当前mock场景下无法返回HTML格式的文件,返回的格式为text/plain。在某些业务场景下需要在特定path下返回某个页面,因此期望可以支持返回HTML格式的数据

How could it be?

mockHtml:
  - path:
      - "a"
      - "mock"
    html: |-
      <!DOCTYPE html>
      <html lang="zh-CN">
      <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>MFE 微前端应用: App1</title>
      </head>
      <body>
        <div class="container">
          <h1>MFE 微前端应用: App1</h1>
          <script src="./js/a.js"></script>
        </div>
      </body>
      </html>

Other related information

Add any other context or screenshots about the feature request here.

@johnlanni
Copy link
Collaborator

@Hazel0928 这个issue 是你这边有计划来完成吗?

@Hazel0928
Copy link
Contributor Author

是的,指给我就好

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants