Browse Source

dev add favicon.ico

Pan 7 years ago
parent
commit
6e859e0f58
1 changed files with 6 additions and 0 deletions
  1. 6 0
      build/webpack.dev.conf.js

+ 6 - 0
build/webpack.dev.conf.js

@@ -1,4 +1,5 @@
1 1
 var utils = require('./utils')
2
+var path = require('path')
2 3
 var webpack = require('webpack')
3 4
 var config = require('../config')
4 5
 var merge = require('webpack-merge')
@@ -6,6 +7,10 @@ var baseWebpackConfig = require('./webpack.base.conf')
6 7
 var HtmlWebpackPlugin = require('html-webpack-plugin')
7 8
 var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
8 9
 
10
+function resolveApp(relativePath) {
11
+  return path.resolve(relativePath);
12
+}
13
+
9 14
 // add hot-reload related code to entry chunks
10 15
 Object.keys(baseWebpackConfig.entry).forEach(function (name) {
11 16
   baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
@@ -28,6 +33,7 @@ module.exports = merge(baseWebpackConfig, {
28 33
     new HtmlWebpackPlugin({
29 34
       filename: 'index.html',
30 35
       template: 'index.html',
36
+      favicon: resolveApp('favicon.ico'),
31 37
       inject: true
32 38
     }),
33 39
     new FriendlyErrorsPlugin()