mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-24 04:33:10 +00:00
[Beta] Add some types (#4728)
* [Beta] Optimize some performance * Unnecessary image optimization * Unused optimizeFonts
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user