Skip to content
This repository was archived by the owner on Jul 9, 2021. It is now read-only.

Commit 50b24dd

Browse files
committed
[fixed] in production mode there is no longer a separate source map file (for performance reasons), do not attempt to read it from memory-fs
1 parent fa0433e commit 50b24dd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/JSCompiler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {transformFile} from 'babel-core';
77
import forEach from 'lodash/forEach';
88
import noop from 'lodash/noop';
99
import {getCompiler} from './webpack';
10-
import {babelBEOptions} from './util';
10+
import {babelBEOptions, isProduction} from './util';
1111
import {logError, log, consoleStyles} from './logger';
1212

1313
/* eslint-disable no-sync */
@@ -198,7 +198,7 @@ export class JSCompiler extends Compiler {
198198
}
199199
this.save(inPath, outPath, {
200200
code: compiler.outputFileSystem.readFileSync(outPath, 'utf8'),
201-
map: compiler.outputFileSystem.readFileSync(`${outPath}.map`, 'utf8')
201+
map: isProduction ? compiler.outputFileSystem.readFileSync(`${outPath}.map`, 'utf8') : ''
202202
}, callback);
203203
});
204204
}

0 commit comments

Comments
 (0)