Add looProtect error to 'output'

This commit is contained in:
Stuart Taylor
2016-10-25 10:58:46 +01:00
parent faadaae543
commit fb8a5d7af7

View File

@@ -10,12 +10,12 @@ import { updateContents } from '../../common/utils/polyvinyl';
const babelOptions = { presets: [ presetEs2015, presetReact ] };
loopProtect.hit = function hit(line) {
var err = 'Error: Exiting potential infinite loop at line ' +
var err = 'Exiting potential infinite loop at line ' +
line +
'. To disable loop protection, write: \n\\/\\/ noprotect\nas the first' +
'line. Beware that if you do have an infinite loop in your code' +
'. To disable loop protection, write: \n\/\/ noprotect\nas the first ' +
'line. Beware that if you do have an infinite loop in your code, ' +
'this will crash your browser.';
console.error(err);
throw new Error(err);
};
const transformersForHtmlJS = {