Skip to content

Commit beb13e9

Browse files
committed
♻️ refactor: move js-yaml-loader to global next.config.js
1 parent 0848039 commit beb13e9

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

next.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ const nextConfig = {
2626
// `placeholder="empty"` to all <ExportedImage> components.
2727
nextImageExportOptimizer_generateAndUseBlurImages: false,
2828
},
29+
webpack: (config) => {
30+
config.module.rules.push({
31+
test: /\.ya?ml/,
32+
use: "js-yaml-loader",
33+
});
34+
35+
return config;
36+
},
2937
};
3038

3139
const withMDX = require("@next/mdx")();

src/app/page.tsx

+4-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
// @ts-expect-error TODO
2-
// eslint-disable-next-line import/no-unresolved,import/no-webpack-loader-syntax
3-
import importProjects from "js-yaml-loader!./../data/projects.yml";
2+
import importProjects from "../data/projects.yml";
43
// @ts-expect-error TODO
5-
// eslint-disable-next-line import/no-unresolved,import/no-webpack-loader-syntax
6-
import importNews from "js-yaml-loader!./../data/news.yml";
4+
import importNews from "../data/news.yml";
75
// @ts-expect-error TODO
8-
// eslint-disable-next-line import/no-unresolved,import/no-webpack-loader-syntax
9-
import importMemberships from "js-yaml-loader!./../data/memberships.yml";
6+
import importMemberships from "../data/memberships.yml";
107
import { Text } from "../components/01_atoms/Text";
118
import { HeroSection } from "../components/03_organisms/heroSection/HeroSection";
129
import s from "./page.module.scss";
@@ -90,12 +87,7 @@ const Home: React.FC = () => {
9087
</Carousel>
9188
</Section>
9289
<Section id="documentation" className={s.documentation}>
93-
<Heading
94-
theme="dark"
95-
align="center"
96-
size="x-large"
97-
className={s.headline}
98-
>
90+
<Heading theme="dark" align="center" size="x-large">
9991
Documentation
10092
</Heading>
10193
<Textblock className={s.text}>

0 commit comments

Comments
 (0)