Use asset module instead of file-loader for html files in webpack

This commit is contained in:
Adam Goldsmith 2022-12-10 12:15:36 -05:00
parent 880c320771
commit 91d729eaf0
2 changed files with 3 additions and 6 deletions

View File

@ -16,7 +16,6 @@
"@types/intl": "^1.2.0",
"babel-loader": "^8.2.5",
"css-loader": "^6.7.1",
"file-loader": "^6.2.0",
"style-loader": "^3.3.1",
"ts-loader": "^9.4.1",
"typescript": "^4.8.4",

View File

@ -10,11 +10,9 @@ const common = {
},
{
test: /\.html$/i,
use: {
loader: 'file-loader',
options: {
name: '[name].[ext]',
},
type: 'asset/resource',
generator: {
filename: '[name][ext]',
},
},
],