add absolute paths
This commit is contained in:
parent
aff0ac7330
commit
6c466d95a1
16
config-overrides.js
Normal file
16
config-overrides.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
module.exports = function override(config) {
|
||||||
|
console.log('Aliases before', config.resolve.alias);
|
||||||
|
config.resolve = {
|
||||||
|
...config.resolve,
|
||||||
|
alias: {
|
||||||
|
...config.alias,
|
||||||
|
'components': path.resolve(__dirname, 'src/components'),
|
||||||
|
'context': path.resolve(__dirname, 'src/context'),
|
||||||
|
'src': path.resolve(__dirname, 'src')
|
||||||
|
},
|
||||||
|
};
|
||||||
|
console.log('CONFIG', config);
|
||||||
|
return config;
|
||||||
|
};
|
||||||
@ -13,10 +13,10 @@
|
|||||||
"uuid": "^8.3.2"
|
"uuid": "^8.3.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "cross-env BROWSER=none PORT=8080 react-scripts start",
|
"start": "cross-env NODE_PATH=src BROWSER=none PORT=8080 react-app-rewired start",
|
||||||
"build": "react-scripts build",
|
"build": "react-app-rewired build",
|
||||||
"test": "react-scripts test",
|
"test": "react-app-rewired test",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-app-rewired eject"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": [
|
"extends": [
|
||||||
@ -38,6 +38,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
|
"react-app-rewired": "^2.2.1",
|
||||||
"react-scripts": "^5.0.1",
|
"react-scripts": "^5.0.1",
|
||||||
"typescript": "^4.7.4"
|
"typescript": "^4.7.4"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"baseUrl": "./",
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"dom",
|
||||||
@ -19,15 +20,13 @@
|
|||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
// "paths": {
|
"paths": {
|
||||||
// "components/*": ["src/components/*"],
|
"components/*": ["src/components/*"],
|
||||||
// "core/*": ["src/core/*"],
|
"context/*": ["src/context/*"],
|
||||||
// "pages/*": ["src/pages/*"],
|
"src/*": ["src/*"],
|
||||||
// "redux/*": ["src/redux/*"],
|
}
|
||||||
// "src/*": ["src/*"],
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src"
|
"src"
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user