Open MonoLogueChi opened 2 years ago
I am temporarily solved with the following solutions.
import { MarkdownConfig } from "vuepress/config";
interface MyMarkdownConfig extends Omit<MarkdownConfig, "plugins"> {
plugins?: Record<string, any> | Array<string | [string, Record<string, any>]>;
}
export default <MyMarkdownConfig>{
plugins: {
"markdown-it-sub": {}
},
};
Bug report
I use vuepress v1.9.7
I use config.ts to configure VuePress, but I have encountered problems when configuring MarkDown.
Steps to reproduce
Description according to https://Vuepress.Vuejs.org/config/#markdown-plugins
What is expected?
I can use the following two ways at the same time.
or
What is actually happening?
But the second (object style) type check cannot pass
Other relevant information
I found that the
MarkdownConfig
type invuepress/types/src/markdon.ts
has the following sectionsIt seems that there is no support for object type here.