1
+ <!-- idoc:ignore:start-->
1
2
babel-plugin-transform-replace-export-default
2
3
===
3
- <!-- rehype:style=display: flex; height: 230px; align-items: center; justify-content: center; font-size: 38px; -->
4
+ <!-- idoc:ignore:end -->
4
5
5
6
Replace ` export default ` with ` return ` , or just remove ` export default ` .
6
7
42
43
const demo = 0 ;
43
44
export default demo ;
44
45
45
- // Output ↓ ↓ ↓ ↓ ↓ ↓
46
+ // 👇👇👇 Output ↓ ↓ ↓ ↓ ↓ ↓
46
47
const demo = 0 ;
47
48
return demo;
48
49
```
@@ -62,7 +63,7 @@ const demo = 0;
62
63
function demo () {};
63
64
export default demo ;
64
65
65
- // Output ↓ ↓ ↓ ↓ ↓ ↓
66
+ // 👇👇👇 Output ↓ ↓ ↓ ↓ ↓ ↓
66
67
function demo () {};
67
68
return demo;
68
69
```
@@ -82,7 +83,7 @@ function demo() {};
82
83
class demo { constructor () { } };
83
84
export default demo ;
84
85
85
- // Output ↓ ↓ ↓ ↓ ↓ ↓
86
+ // 👇👇👇 Output ↓ ↓ ↓ ↓ ↓ ↓
86
87
class demo { constructor () { } };
87
88
return demo;
88
89
```
@@ -101,7 +102,7 @@ class demo { constructor() { } };
101
102
// Input Code
102
103
export default class demo { constructor () { } };
103
104
104
- // Output ↓ ↓ ↓ ↓ ↓ ↓
105
+ // 👇👇👇 Output ↓ ↓ ↓ ↓ ↓ ↓
105
106
return class demo { constructor () { } };
106
107
```
107
108
@@ -118,7 +119,7 @@ Output Result
118
119
// Input Code
119
120
export default class demo { constructor () { } };
120
121
121
- // Output ↓ ↓ ↓ ↓ ↓ ↓
122
+ // 👇👇👇 Output ↓ ↓ ↓ ↓ ↓ ↓
122
123
return class demo { constructor () { } };
123
124
```
124
125
@@ -147,7 +148,7 @@ Output Result
147
148
// Input Code
148
149
export default class demo {}
149
150
150
- // Output ↓ ↓ ↓ ↓ ↓ ↓
151
+ // 👇👇👇 Output ↓ ↓ ↓ ↓ ↓ ↓
151
152
class demo {}
152
153
```
153
154
@@ -164,7 +165,7 @@ Output Result
164
165
// Input Code
165
166
export default function demo () {}
166
167
167
- // Output ↓ ↓ ↓ ↓ ↓ ↓
168
+ // 👇👇👇 Output ↓ ↓ ↓ ↓ ↓ ↓
168
169
function demo () {}
169
170
```
170
171
@@ -182,7 +183,7 @@ Output Result
182
183
class demo {}
183
184
export default demo ;
184
185
185
- // Output ↓ ↓ ↓ ↓ ↓ ↓
186
+ // 👇👇👇 Output ↓ ↓ ↓ ↓ ↓ ↓
186
187
class demo {}
187
188
```
188
189
@@ -200,7 +201,7 @@ class demo {}
200
201
function demo () {}
201
202
export default demo ;
202
203
203
- // Output ↓ ↓ ↓ ↓ ↓ ↓
204
+ // 👇👇👇 Output ↓ ↓ ↓ ↓ ↓ ↓
204
205
function demo () {}
205
206
```
206
207
@@ -218,7 +219,7 @@ function demo() {}
218
219
const demo = 0 ;
219
220
export default demo ;
220
221
221
- // Output ↓ ↓ ↓ ↓ ↓ ↓
222
+ // 👇👇👇 Output ↓ ↓ ↓ ↓ ↓ ↓
222
223
const demo = 0 ;
223
224
```
224
225
@@ -234,6 +235,16 @@ const demo = 0;
234
235
- [ markdown-react-code-preview-loader] ( https://github.com/kktjs/markdown-react-code-preview-loader )
235
236
- [ babel-plugin-transform-remove-imports] ( https://github.com/uiwjs/babel-plugin-transform-remove-imports )
236
237
238
+ ## Contributors
239
+
240
+ As always, thanks to our amazing contributors!
241
+
242
+ <a href =" https://github.com/kktjs/babel-plugin-transform-replace-export-default/graphs/contributors " >
243
+ <img src =" https://kktjs.github.io/babel-plugin-transform-replace-export-default/CONTRIBUTORS.svg " />
244
+ </a >
245
+
246
+ Made with [ github-action-contributors] ( https://github.com/jaywcjlove/github-action-contributors ) .
247
+
237
248
## License
238
249
239
250
MIT © [ ` Kenny Wong ` ] ( https://github.com/jaywcjlove )
0 commit comments