Skip to content

Commit

Permalink
feat: footer + social icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantotone committed Jan 24, 2024
1 parent ac563b9 commit c763fd9
Show file tree
Hide file tree
Showing 18 changed files with 3,332 additions and 87 deletions.
30 changes: 29 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
webpack(config) {
// Grab the existing rule that handles SVG imports
const fileLoaderRule = config.module.rules.find((rule) =>
rule.test?.test?.('.svg'),
)

config.module.rules.push(
// Reapply the existing rule, but only for svg imports ending in ?url
{
...fileLoaderRule,
test: /\.svg$/i,
resourceQuery: /url/, // *.svg?url
},
// Convert all other *.svg imports to React components
{
test: /\.svg$/i,
issuer: fileLoaderRule.issuer,
resourceQuery: { not: [...fileLoaderRule.resourceQuery.not, /url/] }, // exclude if *.svg?url
use: ['@svgr/webpack'],
},
)

// Modify the file loader rule to ignore *.svg, since we have it handled now.
fileLoaderRule.exclude = /\.svg$/i

return config
},
}

module.exports = nextConfig
Loading

0 comments on commit c763fd9

Please sign in to comment.