File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -87,15 +87,15 @@ module.exports = function(argv, cwd) {
87
87
88
88
const partialConfig = babel . loadPartialConfig ( {
89
89
/*
90
- * This is a small mystery. Even if we set the cwd & root
91
- * options, deep in babel, if the filename option is not
92
- * set, then it doesn't see the "cwd" directory as a valid
93
- * directory where it should look for the .babelrc file.
94
- * The fact that this is set to webpack.config.js is not
95
- * significant at all - you could even invent a filename.
96
- * However, as I'm not sure the side effects (the filename
97
- * option is documented as "for error messages"), we're
98
- * setting it to a realistic filename .
90
+ * There are two types of babel configuration:
91
+ * - project-wide configuration in babel.config.* files
92
+ * - file-relative configuration in .babelrc.* files
93
+ * or package.json files with a "babel" key
94
+ *
95
+ * To detect the file-relative configuration we need
96
+ * to set the following values. The filename is needed
97
+ * for Babel as an example so that it knows where it
98
+ * needs to search the relative config for .
99
99
*/
100
100
root : cwd ,
101
101
cwd : cwd ,
You can’t perform that action at this time.
0 commit comments