Skip to content

Commit

Permalink
Merge pull request #45 from bdsqqq/BDS-65
Browse files Browse the repository at this point in the history
Remove unused MDX deps, providers, and configs
  • Loading branch information
bdsqqq committed Mar 18, 2023
2 parents ee2f840 + 367cb56 commit 855b463
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 156 deletions.
27 changes: 1 addition & 26 deletions app/Providers.tsx
@@ -1,35 +1,10 @@
"use client";

import { MDXProvider } from "@mdx-js/react";
import StyledLinkWithIcon from "@/components/ui/StyledLink";
import Popover from "@/components/ui/Popover";

export const Providers = ({ children }: { children: React.ReactNode }) => {
return (
<>
<HistoryTracker />
<MDXProvider
components={{
// @ts-ignore
a: (props) => <StyledLinkWithIcon {...props} />,
h1: (props) => (
<h1 className="text-2xl text-gray-11 mb-8" {...props} />
),
h2: (props) => <h1 className="text-lg font-bold my-2" {...props} />,
strong: (props) => (
<strong className="font-bold text-gray-12" {...props} />
),
pre: (props) => (
<pre
className="bg-gray-2 rounded p-4 my-2 overflow-x-auto text-sm"
{...props}
/>
),
Popover: (props) => <Popover {...props} />,
}}
>
{children}
</MDXProvider>
{children}
</>
);
};
Expand Down
45 changes: 15 additions & 30 deletions next.config.mjs
@@ -1,39 +1,24 @@
/** @type {import('next').NextConfig} */

import remarkGfm from "remark-gfm";

import bundleAnalyzer from "@next/bundle-analyzer";
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === "true",
});

import mdx from "@next/mdx";
const withMDX = mdx({
extension: /\.mdx?$/,
options: {
remarkPlugins: [remarkGfm],
rehypePlugins: [],
// If you use `MDXProvider`, uncomment the following line.
providerImportSource: "@mdx-js/react",
},
});

export default withBundleAnalyzer({
...withMDX({
swcMinify: true,
reactStrictMode: true,
pageExtensions: ["ts", "tsx", "js", "jsx", "md", "mdx"],
experimental: {
appDir: true,
},
redirects: async () => {
return [
{
source: "/p/:slug",
destination: "/work/:slug",
permanent: true,
},
];
},
}),
swcMinify: true,
reactStrictMode: true,
pageExtensions: ["ts", "tsx", "js", "jsx", "md", "mdx"],
experimental: {
appDir: true,
},
redirects: async () => {
return [
{
source: "/p/:slug",
destination: "/work/:slug",
permanent: true,
},
];
},
});
3 changes: 0 additions & 3 deletions package.json
Expand Up @@ -9,16 +9,13 @@
"lint": "next lint"
},
"dependencies": {
"@mdx-js/loader": "^2.3.0",
"@mdx-js/react": "^2.3.0",
"@next/bundle-analyzer": "^12.3.4",
"@next/mdx": "^13.2.3",
"@radix-ui/react-icons": "^1.2.0",
"@radix-ui/react-separator": "^1.0.1",
"@vercel/og": "^0.0.24",
"ariakit": "2.0.0-next.43",
"class-variance-authority": "^0.4.0",
"gray-matter": "^4.0.3",
"next": "^13.2.3",
"next-mdx-remote": "^4.4.1",
"next-seo": "^4.29.0",
Expand Down
97 changes: 0 additions & 97 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit 855b463

@vercel
Copy link

@vercel vercel bot commented on 855b463 Mar 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.