Skip to content

Commit

Permalink
svg inline
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Jun 15, 2024
1 parent aaa7a24 commit 3113467
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h5 class="offcanvas-title" id="offcanvasLabel">webOS Homebrew</h5>
<div class="offcanvas-body">
<ul class="navbar-nav flex-grow-1 justify-content-start">
<li class="nav-item d-none d-md-inline-block"><a class="nav-link" href="#">
<img class="bi" width="32" height="32" src="/img/icon32.svg?inline" alt="webOS Homebrew"/>
<img class="bi" width="32" height="32" src="/img/icon32.svg" alt="webOS Homebrew"/>
</a></li>
<li class="nav-item"><a class="nav-link" href="https://repo.webosbrew.org/">Apps</a></li>
<li class="nav-item"><a class="nav-link" href="/develop">Develop</a></li>
Expand Down
15 changes: 10 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,16 @@ module.exports = {
},
// images
{
test: /\.(png|svg|jpe?g|webp)$/i,
type: 'asset/resource',
generator: {
filename: 'img/[name].[hash:8][ext]',
},
oneOf: [
{
test: /\.(jpe?g|png|webp)$/i,
type: "asset/resource",
generator: {
filename: 'img/[name].[hash:8][ext]',
}
},
{test: /\.(svg)$/i, type: "asset/inline"},
],
use: [
{
loader: ImageMinimizerPlugin.loader,
Expand Down

0 comments on commit 3113467

Please sign in to comment.