瀏覽代碼

Fixes #1305: avoid pointing to missing source maps

Alex Dima 5 年之前
父節點
當前提交
d3fdf3bfc7
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      gulpfile.js

+ 2 - 0
gulpfile.js

@@ -317,6 +317,8 @@ function ESM_pluginStream(plugin, destinationPath) {
 				}
 				}
 			}
 			}
 
 
+			contents = contents.replace(/\/\/# sourceMappingURL=.*((\r?\n)|$)/g, '');
+
 			data.contents = Buffer.from(contents);
 			data.contents = Buffer.from(contents);
 			this.emit('data', data);
 			this.emit('data', data);
 		}))
 		}))