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

Commit

Permalink
[fixed] in production mode there is no longer a separate source map f…
Browse files Browse the repository at this point in the history
…ile (for performance reasons), do not attempt to read it from `memory-fs`
  • Loading branch information
thealjey committed Feb 14, 2017
1 parent fa0433e commit 50b24dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/JSCompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {transformFile} from 'babel-core';
import forEach from 'lodash/forEach';
import noop from 'lodash/noop';
import {getCompiler} from './webpack';
import {babelBEOptions} from './util';
import {babelBEOptions, isProduction} from './util';
import {logError, log, consoleStyles} from './logger';

/* eslint-disable no-sync */
Expand Down Expand Up @@ -198,7 +198,7 @@ export class JSCompiler extends Compiler {
}
this.save(inPath, outPath, {
code: compiler.outputFileSystem.readFileSync(outPath, 'utf8'),
map: compiler.outputFileSystem.readFileSync(`${outPath}.map`, 'utf8')
map: isProduction ? compiler.outputFileSystem.readFileSync(`${outPath}.map`, 'utf8') : ''
}, callback);
});
}
Expand Down

0 comments on commit 50b24dd

Please sign in to comment.