|
1 | | -const path = require('path') |
2 | | -const resolveFrom = require('resolve-from') |
| 1 | +const path = require("path"); |
| 2 | +const resolveFrom = require("resolve-from"); |
3 | 3 |
|
4 | | -const fixLinkedDependencies = config => { |
| 4 | +const fixLinkedDependencies = (config) => { |
5 | 5 | config.resolve = { |
6 | 6 | ...config.resolve, |
7 | 7 | alias: { |
8 | 8 | ...config.resolve.alias, |
9 | | - react$: resolveFrom(path.resolve('node_modules'), 'react'), |
10 | | - 'react-dom$': resolveFrom(path.resolve('node_modules'), 'react-dom'), |
| 9 | + react$: resolveFrom(path.resolve("node_modules"), "react"), |
| 10 | + "react-dom$": resolveFrom(path.resolve("node_modules"), "react-dom"), |
11 | 11 | }, |
12 | | - } |
13 | | - return config |
14 | | -} |
| 12 | + }; |
| 13 | + return config; |
| 14 | +}; |
15 | 15 |
|
16 | | -const includeSrcDirectory = config => { |
| 16 | +const includeSrcDirectory = (config) => { |
17 | 17 | config.resolve = { |
18 | 18 | ...config.resolve, |
19 | | - modules: [path.resolve('src'), ...config.resolve.modules], |
20 | | - } |
21 | | - return config |
22 | | -} |
| 19 | + modules: [path.resolve("src"), ...config.resolve.modules], |
| 20 | + }; |
| 21 | + return config; |
| 22 | +}; |
23 | 23 |
|
24 | 24 | module.exports = [ |
25 | | - ['use-babel-config', '.babelrc'], |
26 | | - ['use-eslint-config', '.eslintrc'], |
| 25 | + ["use-babel-config", ".babelrc"], |
| 26 | + ["use-eslint-config", ".eslintrc"], |
27 | 27 | fixLinkedDependencies, |
28 | 28 | // includeSrcDirectory, |
29 | | -] |
| 29 | +]; |
0 commit comments