diff --git a/lib/index.js b/lib/index.js index 2fc0b62..1ee7a8b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -205,7 +205,10 @@ function createPrefix(loaderContext, globalVarTree, globalVars, useEval) { module.exports = function loader(originalSource, inputSourceMap) { const self = this; const callback = this.async(); - let source = originalSource; + let source = originalSource + //.replace(/\/\/.*/g, '') // remove line comments (somehow this bugs) + .replace(/\/\*[^]*?\*\//g, '/* stripped comment */'); // block comments + let globalVars = []; let exportedVars = [];