Browse Source

roadhog打包自动添加hash实现

zhuth 6 years ago
parent
commit
6c2613cd60
3 changed files with 6 additions and 6 deletions
  1. 6 1
      .webpackrc
  2. 0 0
      public/favicon.png
  3. 0 5
      src/index.ejs

+ 6 - 1
.webpackrc

@@ -2,5 +2,10 @@
     "extraBabelPlugins": [
         ["import", { "libraryName": "antd", "libraryDirectory": "es", "style": true }]
     ],
-    "disableCSSModules": true
+    "disableCSSModules": true,
+    "hash": true,
+    "html": {
+        "favicon": "./public/favicon.png",
+        "template": "./src/index.ejs"
+    }
 }

+ 0 - 0
public/images/favicon.png → public/favicon.png


+ 0 - 5
public/index.html → src/index.ejs

@@ -4,13 +4,8 @@
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <title>BI 商业智能平台</title>
-  <link rel="shortcut icon" href="/images/favicon.png">
-  <link rel="stylesheet" href="index.css" />
 </head>
 <body>
-
   <div id="root"></div>
-  <script src="index.js"></script>
-
 </body>
 </html>