dev add favicon.ico
This commit is contained in:
parent
f65e714e9e
commit
6e859e0f58
|
@ -1,4 +1,5 @@
|
||||||
var utils = require('./utils')
|
var utils = require('./utils')
|
||||||
|
var path = require('path')
|
||||||
var webpack = require('webpack')
|
var webpack = require('webpack')
|
||||||
var config = require('../config')
|
var config = require('../config')
|
||||||
var merge = require('webpack-merge')
|
var merge = require('webpack-merge')
|
||||||
|
@ -6,6 +7,10 @@ var baseWebpackConfig = require('./webpack.base.conf')
|
||||||
var HtmlWebpackPlugin = require('html-webpack-plugin')
|
var HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||||
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
|
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
|
||||||
|
|
||||||
|
function resolveApp(relativePath) {
|
||||||
|
return path.resolve(relativePath);
|
||||||
|
}
|
||||||
|
|
||||||
// add hot-reload related code to entry chunks
|
// add hot-reload related code to entry chunks
|
||||||
Object.keys(baseWebpackConfig.entry).forEach(function (name) {
|
Object.keys(baseWebpackConfig.entry).forEach(function (name) {
|
||||||
baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
|
baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
|
||||||
|
@ -28,6 +33,7 @@ module.exports = merge(baseWebpackConfig, {
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
filename: 'index.html',
|
filename: 'index.html',
|
||||||
template: 'index.html',
|
template: 'index.html',
|
||||||
|
favicon: resolveApp('favicon.ico'),
|
||||||
inject: true
|
inject: true
|
||||||
}),
|
}),
|
||||||
new FriendlyErrorsPlugin()
|
new FriendlyErrorsPlugin()
|
||||||
|
|
Loading…
Reference in New Issue