feat: Add mdx

This commit is contained in:
Till Kolter 2020-08-22 14:22:11 +02:00
parent 8e5a5e8a83
commit d78e0a3fbf
4 changed files with 897 additions and 4 deletions

889
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -57,8 +57,10 @@
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-jsx": "^7.10.4",
"@babel/plugin-syntax-typescript": "^7.10.4",
"@babel/plugin-transform-react-jsx": "^7.10.4",
"@cypress/webpack-preprocessor": "^5.4.2",
"@hot-loader/react-dom": "^16.12.0",
"@mdx-js/loader": "^1.6.16",
"@types/chai": "^4.2.12",
"@types/dompurify": "^2.0.2",
"@types/enzyme": "^3.10.5",
@ -109,6 +111,8 @@
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-hot-loader": "^4.12.21",
"rehype-stringify": "^8.0.0",
"remark-slug": "^6.0.0",
"rimraf": "^3.0.2",
"shelljs": "^0.8.4",
"source-map-loader": "^1.0.1",
@ -119,6 +123,7 @@
"ts-node": "^8.10.2",
"typescript": "^3.9.7",
"unfetch": "^4.1.0",
"unist-util-visit": "^2.0.3",
"url-polyfill": "^1.1.10",
"webpack": "^4.44.0",
"webpack-cli": "^3.3.12",

4
src/types/mdx.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
declare module '*.mdx' {
let MDXComponent: (props: any) => JSX.Element;
export default MDXComponent;
}

View File

@ -39,6 +39,7 @@
"./demo/playground/hmr-playground.tsx",
"./src/**/*.ts?",
"demo/*.tsx",
"src/empty.js"
"src/empty.js",
"src/types/mdx.d.ts"
]
}