diff --git a/ace-loader/src/genAbc-plugin.js b/ace-loader/src/genAbc-plugin.js index 3fe81f3..17db288 100644 --- a/ace-loader/src/genAbc-plugin.js +++ b/ace-loader/src/genAbc-plugin.js @@ -66,7 +66,10 @@ class GenAbcPlugin { keys.forEach(key => { // choice *.js if (output && webpackPath && path.extname(key) === '.js') { - const newContent = forward + assets[key].source() + last + let newContent = assets[key].source() + if (key.search('./workers/') != 0) { + newContent = forward + newContent + last + } const keyPath = key.replace(/\.js$/, firstFileEXT) writeFileSync(newContent, path.resolve(output, keyPath), key) } diff --git a/ace-loader/src/genBin-plugin.js b/ace-loader/src/genBin-plugin.js index 3ab00e8..12ba9a4 100644 --- a/ace-loader/src/genBin-plugin.js +++ b/ace-loader/src/genBin-plugin.js @@ -54,7 +54,10 @@ class GenBinPlugin { keys.forEach(key => { // choice *.js if (output && webpackPath && path.extname(key) === '.js') { - const newContent = forward + assets[key].source() + last + let newContent = assets[key].source() + if (key.search('./workers/') != 0) { + newContent = forward + newContent + last + } const keyPath = key.replace(/\.js$/, firstFileEXT) writeFileSync(newContent, path.resolve(output, keyPath), key) }