diff --git a/nezha-fronted/build/webpack.dev.conf.js b/nezha-fronted/build/webpack.dev.conf.js index b9343e8db..3c79326bf 100644 --- a/nezha-fronted/build/webpack.dev.conf.js +++ b/nezha-fronted/build/webpack.dev.conf.js @@ -55,7 +55,7 @@ const devWebpackConfig = merge(baseWebpackConfig, { new webpack.NoEmitOnErrorsPlugin(), // https://github.com/ampedandwired/html-webpack-plugin new HtmlWebpackPlugin({ - favicon: require('../src/assets/img/favicon.ico'), + favicon: path.resolve(__dirname, '../src/assets/img/favicon.ico'), filename: 'index.html', template: 'index.html', inject: true diff --git a/nezha-fronted/build/webpack.prod.conf.js b/nezha-fronted/build/webpack.prod.conf.js index 1f2600c43..b3d516e39 100644 --- a/nezha-fronted/build/webpack.prod.conf.js +++ b/nezha-fronted/build/webpack.prod.conf.js @@ -91,7 +91,7 @@ const webpackConfig = merge(baseWebpackConfig, { // you can customize output by editing /index.html // see https://github.com/ampedandwired/html-webpack-plugin new HtmlWebpackPlugin({ - favicon: require('../src/assets/img/favicon.ico'), + favicon: path.resolve(__dirname, '../src/assets/img/favicon.ico'), filename: config.build.index, template: 'index.html', hash: false,