Browse Source

排除当dns为空时候的bug

pixel 3 years ago
parent
commit
4551ab3cc8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      web/public/index.html

+ 1 - 1
web/public/index.html

@@ -8,7 +8,7 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <title><%=htmlWebpackPlugin.options.title%></title>
-    <% if(process.env.NODE_ENV!=='development'){ %>
+    <% if(process.env.NODE_ENV!=='development' && htmlWebpackPlugin.options.cdns){ %>
       <% htmlWebpackPlugin.options.cdns.forEach(function(item){ if(item.js){ %>
         <script type="text/javascript" src="<%= item.js %>"></script>
       <% } }) %>