New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alliasing webpack jest vs code #55

Merged
merged 6 commits into from Dec 13, 2018
File filter...
Filter file types
Jump to file or symbol
Failed to load files and symbols.
+31 −3
Diff settings

Always

Just for now

Copy path View file
@@ -4,5 +4,14 @@
"restoreMocks": true,
"setupFiles": [
"<rootDir>/config/test/polyfills.js"
]
}
],
"moduleNameMapper": {
"^api/(.*)$": "/src/api/$1",
"^commonApp/(.*)$": "/src/common-app/$1",
"^core/(.*)$": "/src/core/$1",
"^layout/(.*)$": "/src/layout/$1",
"^pods/(.*)$": "/src/pods/$1",
"^sagas/(.*)$": "/src/sagas/$1",
"^scenes/(.*)$": "/src/scenes/$1"
}
}
Copy path View file
@@ -11,7 +11,17 @@
"allowJs": true,
"suppressImplicitAnyIndexErrors": true,
"skipLibCheck": true,
"esModuleInterop": true
"esModuleInterop": true,
"baseUrl": "./src/",
"paths": {
"api": ["./src/api/*"],
"commonApp": ["./src/common-app/*"],
"core": ["./src/core/*"],
"layout": ["./src/layout/*"],
"pods": ["./src/pods/*"],
"sagas": ["./src/sagas/*"],
"scenes": ["./src/scenes/*"]
}
},
"compileOnSave": false,
"exclude": [
Copy path View file
@@ -6,6 +6,15 @@ const srcPath = path.resolve(__dirname, 'src');
module.exports = {
context: srcPath,
resolve: {
alias: {
api: path.resolve(__dirname, './src/api/'),
commonApp: path.resolve(__dirname, './src/common-app/'),
core: path.resolve(__dirname, './src/core/'),
layout: path.resolve(__dirname, './src/layout/'),
pods: path.resolve(__dirname, './src/pods/'),
sagas: path.resolve(__dirname, './src/sagas/'),
scenes: path.resolve(__dirname, './src/scenes/'),
},
extensions: ['.js', '.jsx', '.ts', '.tsx'],
mainFields: ['browser', 'module', 'main'],
},
ProTip! Use n and p to navigate between commits in a pull request.