|
@@ -11,9 +11,12 @@
|
|
|
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
|
|
|
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
|
|
|
<% } %>
|
|
|
- <!--S 加载百度统计及剑鱼自定义埋点 -->
|
|
|
- <script src="https://www.jianyu360.cn/common-module/public/head.js"></script>
|
|
|
- <!--E 加载百度统计及剑鱼自定义埋点-->
|
|
|
+ <% if (process.env.NODE_ENV === 'production') { %>
|
|
|
+ <!-- 生产环境需要加载的js -->
|
|
|
+ <!--S 加载百度统计及剑鱼自定义埋点 -->
|
|
|
+ <script src="//www.jianyu360.cn/common-module/public/head.js"></script>
|
|
|
+ <!--E 加载百度统计及剑鱼自定义埋点-->
|
|
|
+ <% } %>
|
|
|
</head>
|
|
|
<body>
|
|
|
<noscript>
|
|
@@ -25,9 +28,12 @@
|
|
|
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
|
|
|
<script type="text/javascript" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
|
|
|
<% } %>
|
|
|
- <!--S 加载荟聚SDK初始化及剑鱼自定义埋点注入 -->
|
|
|
- <script src="https://cdn-common.jianyu360.com/cdn/lib/jquery/3.5.1/jquery.min.js"></script>
|
|
|
- <script src="https://www.jianyu360.cn/common-module/public/fotter.js"></script>
|
|
|
- <!--E 加载荟聚SDK初始化及剑鱼自定义埋点注入 -->
|
|
|
+ <% if (process.env.NODE_ENV === 'production') { %>
|
|
|
+ <!-- 生产环境需要加载的js -->
|
|
|
+ <!--S 加载荟聚SDK初始化及剑鱼自定义埋点注入 -->
|
|
|
+ <script src="//cdn-common.jianyu360.com/cdn/lib/jquery/3.5.1/jquery.min.js"></script>
|
|
|
+ <script src="//www.jianyu360.cn/common-module/public/fotter.js"></script>
|
|
|
+ <!--E 加载荟聚SDK初始化及剑鱼自定义埋点注入 -->
|
|
|
+ <% } %>
|
|
|
</body>
|
|
|
</html>
|