File tree 8 files changed +34
-2
lines changed
8 files changed +34
-2
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " components" ,
3
+ "main" : " dist/index" ,
4
+ "peerDependencies" : {
5
+ "react" : " ~16.13.1"
6
+ },
7
+ "devDependencies" : {
8
+ "@types/react" : " ~16.9.43"
9
+ }
10
+ }
Original file line number Diff line number Diff line change
1
+ import React from "react" ;
2
+
3
+ export const Button = ( ) => < button onClick = { ( ) => alert ( 'you clicked me' ) } > Click me</ button > ;
Original file line number Diff line number Diff line change
1
+ export * from "./button" ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends" : " ../../tsconfig.json" ,
3
+ "compilerOptions" : {
4
+ "jsx" : " react" ,
5
+ "allowSyntheticDefaultImports" : true
6
+ }
7
+ }
Original file line number Diff line number Diff line change
1
+ const withTM = require ( 'next-transpile-modules' ) ( [ 'components' ] ) ;
2
+
3
+ module . exports = withTM ( ) ;
Original file line number Diff line number Diff line change 12
12
"react" : " ~16.13.1" ,
13
13
"react-dom" : " ~16.13.1" ,
14
14
"typescript" : " ~3.9.6"
15
+ },
16
+ "devDependencies" : {
17
+ "next-transpile-modules" : " ~3.3.0"
15
18
}
16
19
}
Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
2
import { meaningOfLife } from "foo" ;
3
+ import { Button } from "components" ;
3
4
4
- export default ( ) => < div > Meaning of life is { meaningOfLife } </ div > ;
5
+ export default ( ) => < div >
6
+ < p > Meaning of life is { meaningOfLife } </ p >
7
+ < Button />
8
+ </ div > ;
Original file line number Diff line number Diff line change 8
8
],
9
9
"baseUrl" : " ../" ,
10
10
"paths" : {
11
- "foo" : [" foo/src" ]
11
+ "foo" : [" foo/src" ],
12
+ "components" : [" components/src" ]
12
13
},
13
14
"allowJs" : true ,
14
15
"skipLibCheck" : true ,
You can’t perform that action at this time.
0 commit comments