diff --git a/src/config/webpack.js b/src/config/webpack.js index 5eeab8b..41e73b4 100644 --- a/src/config/webpack.js +++ b/src/config/webpack.js @@ -227,7 +227,7 @@ function createWebpackConfig({ isModernJS } = {}) { } }, { - test: /\.(jpg|png|gif|mp4|m4v|flv|mp3|wav|m4a|eot|ttf|woff|woff2|mp4|webm|webp|avif)$/, + test: /\.(jpg|png|gif|mp4|m4v|flv|mp3|wav|m4a|eot|ttf|woff|woff2|webm|webp|avif)$/, type: 'asset' }, { diff --git a/ts/custom.d.ts b/ts/custom.d.ts index 3a4dcac..b4dc757 100644 --- a/ts/custom.d.ts +++ b/ts/custom.d.ts @@ -103,3 +103,18 @@ declare module '*.html' { const html: string; export default html; } + +declare module '*.webp' { + const webp: string; + export default webp; +} + +declare module '*.webm' { + const webm: string; + export default webm; +} + +declare module '*.avif' { + const avif: string; + export default avif; +} \ No newline at end of file