Browse Source

Refactor file paths for webfonts and images to improve organization and readability

node16
Onja 12 months ago
parent
commit
596891357b
  1. 8
      webpack.config.js

8
webpack.config.js

@ -54,17 +54,17 @@ module.exports = (env, argv) => {
// loader for webfonts (only required if loading custom fonts) // loader for webfonts (only required if loading custom fonts)
{ {
test: /\.(woff|woff2|eot|ttf|otf)$/, test: /\.(woff|woff2|eot|ttf|otf)$/,
type: 'asset/resource', type: 'src/assets/fonts',
generator: { generator: {
filename: './public/css/font/[name][ext]', filename: './public/fonts/[name][ext]',
} }
}, },
// loader for images and icons (only required if css references image files) // loader for images and icons (only required if css references image files)
{ {
test: /\.(png|jpg|gif)$/, test: /\.(png|jpg|gif)$/,
type: 'asset/resource', type: 'src/assets/img',
generator: { generator: {
filename: './public/css/img/[name][ext]', filename: './public/img/[name][ext]',
} }
}, },
] ]

Loading…
Cancel
Save