mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-06 04:42:40 +02:00
feat(v2): Support swizzling TypeScript components (#2671)
* feat(v2): Support swizzling TypeScript components * Add tsc --noEmit to tsc script in theme-classic Now everything can pass the type checker! (although still a lot of any) * Add tsconfig and types.d.ts to website Improve developer experience. As an example, I converted NotFound to tsx * Apply type annotation suggestions * Do not fallback to `getThemePath` if getTypeScriptThemePath is undefined * Fix tsc * Add module declaration for @theme-original/* * Move babel cli to root package.json
This commit is contained in:
parent
20930dc837
commit
5ccd24cc1f
59 changed files with 345 additions and 108 deletions
|
@ -60,7 +60,7 @@ export function objectWithKeySorted(obj: {[index: string]: any}) {
|
|||
}
|
||||
|
||||
const indexRE = /(^|.*\/)index\.(md|js|jsx|ts|tsx)$/i;
|
||||
const extRE = /\.(md|js|tsx)$/;
|
||||
const extRE = /\.(md|js|ts|tsx)$/;
|
||||
|
||||
/**
|
||||
* Convert filepath to url path.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue