Skip to content

Commit af88437

Browse files
committed
x
1 parent 3620c65 commit af88437

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

webpack.config.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const { interpolateName } = require('loader-utils');
1919
const fs = require('fs');
2020
const glob = require('glob');
2121
const path = require('path');
22+
const { type } = require('os');
2223
const context = path.join(__dirname, 'src');
2324
const outputDir = path.join(__dirname, 'dist');
2425
const baseUrl = 'https://bvarga.dev';
@@ -45,15 +46,22 @@ module.exports = {
4546
module: {
4647
rules: [
4748
{
48-
test: /\.(png|jpg|jpeg|gif|svg|webp)$/,
49+
test: /\.(png|jpg|jpeg|gif|svg|webp)$/i,
4950
type: 'asset/resource',
5051
},
5152
{
52-
test: /\.ejs/,
53+
test: /\.(woff2?|eot|ttf|otf)$/i,
54+
type: 'asset/resource',
55+
generator: {
56+
filename: '[name].[hash][ext]'
57+
}
58+
},
59+
{
60+
test: /\.ejs/i,
5361
use: ['html-loader', 'template-ejs-loader'],
5462
},
5563
{
56-
test: /\.s?[ac]ss$/,
64+
test: /\.s?[ac]ss$/i,
5765
use: [
5866
MiniCssExtractPlugin.loader,
5967
{

0 commit comments

Comments
 (0)