diff --git a/beta/next.config.js b/beta/next.config.js index bb4829b01..d34686b1c 100644 --- a/beta/next.config.js +++ b/beta/next.config.js @@ -6,7 +6,10 @@ const path = require('path'); const {remarkPlugins} = require('./plugins/markdownToHtml'); const redirects = require('./src/redirects.json'); -module.exports = { +/** + * @type {import('next').NextConfig} + **/ +const nextConfig = { pageExtensions: ['jsx', 'js', 'ts', 'tsx', 'mdx', 'md'], experimental: { plugins: true, @@ -80,3 +83,5 @@ module.exports = { return config; }, }; + +module.exports = nextConfig; diff --git a/beta/package.json b/beta/package.json index 68e2f9b23..83f644301 100644 --- a/beta/package.json +++ b/beta/package.json @@ -44,6 +44,7 @@ "@mdx-js/loader": "^1.6.16", "@types/body-scroll-lock": "^2.6.1", "@types/classnames": "^2.2.10", + "@types/debounce": "^1.2.1", "@types/github-slugger": "^1.3.0", "@types/mdx-js__react": "^1.5.2", "@types/node": "^14.6.4", diff --git a/beta/src/components/MDX/Challenges/Navigation.tsx b/beta/src/components/MDX/Challenges/Navigation.tsx index 1e1b76f91..36f2deadc 100644 --- a/beta/src/components/MDX/Challenges/Navigation.tsx +++ b/beta/src/components/MDX/Challenges/Navigation.tsx @@ -6,7 +6,7 @@ import React, {createRef} from 'react'; import cn from 'classnames'; import {IconChevron} from 'components/Icon/IconChevron'; import {ChallengeContents} from './Challenges'; -const debounce = require('debounce'); +import {debounce} from 'debounce'; export function Navigation({ challenges, diff --git a/beta/src/components/MDX/Heading.tsx b/beta/src/components/MDX/Heading.tsx index 4b177eadf..6e29bc4e7 100644 --- a/beta/src/components/MDX/Heading.tsx +++ b/beta/src/components/MDX/Heading.tsx @@ -4,7 +4,6 @@ import cn from 'classnames'; import * as React from 'react'; -import {siteConfig} from 'siteConfig'; import {forwardRefWithAs} from 'utils/forwardRefWithAs'; export interface HeadingProps { className?: string; diff --git a/beta/yarn.lock b/beta/yarn.lock index a149894d6..d4162ae0f 100644 --- a/beta/yarn.lock +++ b/beta/yarn.lock @@ -846,6 +846,11 @@ dependencies: classnames "*" +"@types/debounce@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@types/debounce/-/debounce-1.2.1.tgz#79b65710bc8b6d44094d286aecf38e44f9627852" + integrity sha512-epMsEE85fi4lfmJUH/89/iV/LI+F5CvNIvmgs5g5jYFPfhO2S/ae8WSsLOKWdwtoaZw9Q2IhJ4tQ5tFCcS/4HA== + "@types/eslint-visitor-keys@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d"