1.npm run build生成代码加密2.在iis添加网站定位到dist文件下第三步第四步配置是www.baidu.com/home一直重新刷新会出现404问题3.安装URL重写https://www.iis.net/downloads…4.在dist文件下配置web.config<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="/" /> </rule> </rules> </rewrite> </system.webServer>遇到一个问题:多访问几次页面或者端口应用程序池的状态会结束(事件ID5002,错误503),原因是后台占用内存太大,解决方法:要勾选预编译并发布版本。