File tree Expand file tree Collapse file tree 3 files changed +23
-21
lines changed Expand file tree Collapse file tree 3 files changed +23
-21
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @idrinth/react-file-based-routes" ,
3
- "version" : " 1.0.0 " ,
3
+ "version" : " 1.0.1 " ,
4
4
"description" : " A simple file based routing library, that does not force itself on you." ,
5
5
"type" : " module" ,
6
6
"keywords" : [
Original file line number Diff line number Diff line change @@ -8,16 +8,17 @@ export default class JsxWriter implements Writer {
8
8
// @ts -ignore TS6133
9
9
add ( path : string , url : string , changed : string ) : void
10
10
{
11
- this . items . push ( ' ' + `(() => {
12
- const LazyElement = lazy(() => import(
13
- \'./pages/${ path } /index.tsx\',
14
- ),);
15
- return {
16
- path: \'${ url } \',
17
- exact: true,
18
- element: <Suspense fallback={<Loader/>}><LazyElement/></Suspense>,
19
- };
20
- })(),` ) ;
11
+ this . items . push ( ` (() => {
12
+ const LazyElement = lazy(() => import(
13
+ \'./pages/${ path } /index.tsx\',
14
+ ),);
15
+ return {
16
+ path: \'${ url } \',
17
+ exact: true,
18
+ element: <Suspense fallback={<Loader/>}><LazyElement/></Suspense>,
19
+ };
20
+ })(),`
21
+ ) ;
21
22
}
22
23
toString ( ) : string {
23
24
return 'import React, {\n' +
Original file line number Diff line number Diff line change @@ -8,16 +8,17 @@ export default class TsxWriter implements Writer {
8
8
// @ts -ignore TS6133
9
9
add ( path : string , url : string , changed : string ) : void
10
10
{
11
- this . items . push ( ' ' + `(() => {
12
- const LazyElement = lazy(() => import(
13
- \'./pages/${ path } /index.tsx\',
14
- ),);
15
- return {
16
- path: \'${ url } \',
17
- exact: true,
18
- element: <Suspense fallback={<Loader/>}><LazyElement/></Suspense>,
19
- };
20
- })(),` ) ;
11
+ this . items . push ( ` (() => {
12
+ const LazyElement = lazy(() => import(
13
+ \'./pages/${ path } /index.tsx\',
14
+ ),);
15
+ return {
16
+ path: \'${ url } \',
17
+ exact: true,
18
+ element: <Suspense fallback={<Loader/>}><LazyElement/></Suspense>,
19
+ };
20
+ })(),` ,
21
+ ) ;
21
22
}
22
23
toString ( ) : string {
23
24
return 'import React, {\n' +
You can’t perform that action at this time.
0 commit comments