【问题标题】:Vue.js not scaling after deployment to windows server 2019 IIS部署到 Windows Server 2019 IIS 后,Vue.js 无法扩展
【发布时间】:2020-11-17 19:21:48
【问题描述】:

npm run serve 后一切正常。在我使用 ASP.NET 中的 API 部署我的应用程序后,应用程序根本无法扩展。我使用路由器和历史记录。启用匿名用户身份验证并安装静态内容。控制台未显示任何错误。在此处输入图像描述 截图链接:

Local run

IIS

【问题讨论】:

    标签: css vue.js iis windows-server-2019


    【解决方案1】:

    vue.js 没有缩放是什么意思?第二个组件显示异常,是不是?
    Javascript 代码 sn-ps 工作可能有问题。
    您是否在 IIS 中安装了 URL Rewrite 扩展并在 webconfig 文件中添加了以下规则?

    <configuration>
      <system.webServer>
        <rewrite>
          <rules>
            <rule name="Handle History Mode and custom 404/500" stopProcessing="true">
                <match url="(.*)" />
                <conditions logicalGrouping="MatchAll">
                  <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                  <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                </conditions>
              <action type="Rewrite" url="index.html" />
            </rule>
          </rules>
    </rewrite>
    

    这是 URL 重写扩展。
    https://www.iis.net/downloads/microsoft/url-rewrite

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-29
      • 2020-08-13
      • 1970-01-01
      • 2019-12-17
      • 1970-01-01
      • 2020-02-08
      相关资源
      最近更新 更多