File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change
1
+ const path = require ( 'path' )
2
+ const rootDir = path . resolve ( __dirname , '..' )
3
+
1
4
module . exports = ( { config } ) => {
2
5
// Enable typescript support
3
6
config . module . rules . push ( {
@@ -18,6 +21,10 @@ module.exports = ({ config }) => {
18
21
]
19
22
} )
20
23
24
+ config . resolve . alias = Object . assign ( config . resolve . alias , {
25
+ '@src' : path . resolve ( rootDir , 'src' )
26
+ } )
27
+
21
28
config . node = {
22
29
__dirname : true
23
30
}
Original file line number Diff line number Diff line change 67
67
"moduleFileExtensions" : [
68
68
" ts" ,
69
69
" js"
70
- ]
70
+ ],
71
+ "moduleNameMapper" : {
72
+ "^@src/(.*)$" : " <rootDir>/$1"
73
+ }
71
74
},
72
75
"prettier" : {
73
76
"semi" : false ,
Original file line number Diff line number Diff line change 13
13
"emitDecoratorMetadata" : true ,
14
14
"declarationDir" : " dist/types" ,
15
15
"outDir" : " dist/lib" ,
16
- "typeRoots" : [" node_modules/@types" ]
16
+ "typeRoots" : [" node_modules/@types" ],
17
+ "baseUrl" : " ." ,
18
+ "paths" : {
19
+ "@src/*" : [" ./src/*" ]
20
+ }
17
21
},
18
22
"include" : [" src" ]
19
23
}
You can’t perform that action at this time.
0 commit comments