@@ -27,11 +27,15 @@ import scopePluginOptions from '@kkt/scope-plugin-options';
2727import { LoaderConfOptions , WebpackConfiguration } from ' kkt' ;
2828import { mdCodeModulesLoader } from ' markdown-react-code-preview-loader' ;
2929
30- export default (conf : WebpackConfiguration , env : ' development' | ' production' , options : LoaderConfOptions ) => {
31- // ....
32- conf = mdCodeModulesLoader (conf );
33- // ....
34- return conf ;
30+ export default (
31+ conf : WebpackConfiguration ,
32+ env : ' development' | ' production' ,
33+ options : LoaderConfOptions
34+ ) => {
35+ // ....
36+ conf = mdCodeModulesLoader (conf );
37+ // ....
38+ return conf ;
3539};
3640```
3741
@@ -45,7 +49,11 @@ import { Options } from 'markdown-react-code-preview-loader';
4549 * @param {Options} option Loader Options
4650 * @returns {webpack.Configuration}
4751 * **/
48- export declare const mdCodeModulesLoader: (config : webpack .Configuration , lang ? : string [], option ? : Options ) => webpack .Configuration ;
52+ export declare const mdCodeModulesLoader: (
53+ config : webpack .Configuration ,
54+ lang ? : string [],
55+ option ? : Options
56+ ) => webpack .Configuration ;
4957```
5058
5159** ② The second method is to manually add the configuration**
@@ -111,10 +119,16 @@ After adding `loader`, use the method to load `markdown` text in the project pro
111119` ` ` jsx
112120import mdObj from ' markdown-react-code-preview-loader/README.md' ;
113121
114- mdObj .source // => `README.md` raw string text
115- mdObj .components // => The component index object, the React component converted from the markdown indexed example. (need to configure meta)
116- mdObj .data // => The component source code index object, the sample source code indexed from markdown. (need to configure meta)
117- mdObj .headings // => This is the parsed header data
122+ // `README.md` raw string text
123+ mdObj .source
124+ // The component index object, the React component converted from the markdown indexed example.
125+ // (need to configure meta)
126+ mdObj .components
127+ // The component source code index object, the sample source code indexed from markdown.
128+ // (need to configure meta)
129+ mdObj .data
130+ // This is the parsed header data
131+ mdObj .headings
118132```
119133
120134``` js
0 commit comments