-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove emtion and install styled-component
- emotion-js/emotion#2928 - the version of next.js over 13 was not supported emotion
- Loading branch information
Showing
7 changed files
with
512 additions
and
748 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,47 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {} | ||
const nextConfig = { | ||
swcMinify: true, | ||
compiler: { | ||
styledComponents: true, | ||
}, | ||
trailingSlash: false, | ||
reactStrictMode: true, | ||
output: "standalone", | ||
|
||
module.exports = nextConfig | ||
eslint: { | ||
ignoreDuringBuilds: true, | ||
}, | ||
images: { | ||
unoptimized: true, | ||
}, | ||
|
||
webpack: (config) => { | ||
// SVGR: https://react-svgr.com/docs/next/ | ||
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import type { Metadata } from "next"; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
"use client"; | ||
export default function Home() { | ||
return ( | ||
<main> | ||
|
Oops, something went wrong.