Skip to content

Commit 6baf3c7

Browse files
committed
fix: get .babelrc from cwd
1 parent cd66ba0 commit 6baf3c7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/compilers/babel-compiler.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ var defaultBabelOptions = {
1111
}
1212

1313
module.exports = function compileBabel (scriptContent) {
14-
// directory can be an absolute or relative path
15-
// If it's a relative path, it is relative to the current working directory (process.cwd())
16-
const directory = path.resolve(__dirname, '..')
17-
const { file, config } = findBabelConfig.sync(directory);
14+
const { file, config } = findBabelConfig.sync(process.cwd());
1815

1916
if (!file) {
2017
logger.info('no .babelrc found, defaulting to default babel options')

0 commit comments

Comments
 (0)