favicon
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
|
||||
// 处理ES模块中的__dirname
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
@@ -24,6 +25,12 @@ export default {
|
||||
port: 3000,
|
||||
historyApiFallback: true,
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: './index.html',
|
||||
favicon: './assets/favicon.ico',
|
||||
}),
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
@@ -35,10 +42,10 @@ export default {
|
||||
options: {
|
||||
transpileOnly: true,
|
||||
compilerOptions: {
|
||||
noEmit: false
|
||||
}
|
||||
}
|
||||
}
|
||||
noEmit: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -74,4 +81,4 @@ export default {
|
||||
},
|
||||
extensions: ['.tsx', '.ts', '.jsx', '.js'],
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user