Skip to content

Commit 59b0a50

Browse files
committed
Fix path settigns
Updated path settings to support resolve for sub-modules. Added missed parent folder path 'src/' for defined paths.
1 parent b898d16 commit 59b0a50

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

tsconfig.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"baseUrl": "/",
66
"paths": {
77
"~": ["*"],
8-
"public": ["public/"],
9-
"actions": ["actions/"],
10-
"main": ["main/"],
11-
"models": ["models/"],
12-
"reducers": ["reducers/"],
13-
"renderer": ["renderer/"],
14-
"utils": ["utils"]
8+
"public*": ["public/"],
9+
"actions*": ["src/actions/"],
10+
"main*": ["src/main/"],
11+
"models*": ["src/models/"],
12+
"reducers*": ["src/reducers/"],
13+
"renderer*": ["src/renderer/"],
14+
"utils*": ["src/utils"]
1515
},
1616
"module": "ESNext",
1717
"moduleResolution": "node",

webpack.common.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ let mainConfig = {
2020
resolve: {
2121
alias: {
2222
'~': __dirname,
23-
'actions': srcPath('actions'),
24-
'main': srcPath('main'),
25-
'models': srcPath('models'),
26-
'reducers': srcPath('reducers'),
27-
'utils': srcPath('utils')
23+
'actions': srcPath('src/actions'),
24+
'main': srcPath('src/main'),
25+
'models': srcPath('src/models'),
26+
'reducers': srcPath('src/reducers'),
27+
'utils': srcPath('src/utils')
2828
},
2929
extensions: ['.js', '.json', '.ts'],
3030
},
@@ -71,9 +71,9 @@ let rendererConfig = {
7171
alias: {
7272
'~': __dirname,
7373
'public': srcPath('public'),
74-
'models': srcPath('models'),
75-
'renderer': srcPath('renderer'),
76-
'utils': srcPath('utils')
74+
'models': srcPath('src/models'),
75+
'renderer': srcPath('src/renderer'),
76+
'utils': srcPath('src/utils')
7777
},
7878
extensions: ['.js', '.json', '.ts', '.tsx'],
7979
},

0 commit comments

Comments
 (0)