@@ -27,11 +27,15 @@ import scopePluginOptions from '@kkt/scope-plugin-options';
27
27
import { LoaderConfOptions , WebpackConfiguration } from ' kkt' ;
28
28
import { mdCodeModulesLoader } from ' markdown-react-code-preview-loader' ;
29
29
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 ;
35
39
};
36
40
```
37
41
@@ -45,7 +49,11 @@ import { Options } from 'markdown-react-code-preview-loader';
45
49
* @param {Options} option Loader Options
46
50
* @returns {webpack.Configuration}
47
51
* **/
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 ;
49
57
```
50
58
51
59
** ② 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
111
119
` ` ` jsx
112
120
import mdObj from ' markdown-react-code-preview-loader/README.md' ;
113
121
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
118
132
```
119
133
120
134
``` js
0 commit comments