Merge pull request #11366 from Bouncey/fix/NoLoopProtectErrorInOutput
Add loopProtect error object
This commit is contained in:
@ -10,12 +10,12 @@ import { updateContents } from '../../common/utils/polyvinyl';
|
|||||||
|
|
||||||
const babelOptions = { presets: [ presetEs2015, presetReact ] };
|
const babelOptions = { presets: [ presetEs2015, presetReact ] };
|
||||||
loopProtect.hit = function hit(line) {
|
loopProtect.hit = function hit(line) {
|
||||||
var err = 'Error: Exiting potential infinite loop at line ' +
|
var err = 'Exiting potential infinite loop at line ' +
|
||||||
line +
|
line +
|
||||||
'. To disable loop protection, write: \n\\/\\/ noprotect\nas the first' +
|
'. To disable loop protection, write: \n\/\/ noprotect\nas the first ' +
|
||||||
'line. Beware that if you do have an infinite loop in your code' +
|
'line. Beware that if you do have an infinite loop in your code, ' +
|
||||||
'this will crash your browser.';
|
'this will crash your browser.';
|
||||||
console.error(err);
|
throw new Error(err);
|
||||||
};
|
};
|
||||||
|
|
||||||
const transformersForHtmlJS = {
|
const transformersForHtmlJS = {
|
||||||
|
Reference in New Issue
Block a user