fix cli error
This commit is contained in:
parent
49854cc825
commit
f9ffb42367
@ -27,6 +27,10 @@ function fromDir(startPath, filter) {
|
|||||||
};
|
};
|
||||||
function doMerge(startPath, fileName) {
|
function doMerge(startPath, fileName) {
|
||||||
const filePath = fileName ? path.join(startPath, fileName) : startPath
|
const filePath = fileName ? path.join(startPath, fileName) : startPath
|
||||||
|
if (filePath.indexOf('.es5.') >= 0){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
console.log('File change:', filePath)
|
||||||
const mergedMap = SourceMapMerger.createMergedSourceMapFromFiles([
|
const mergedMap = SourceMapMerger.createMergedSourceMapFromFiles([
|
||||||
filePath.replace(/bundle\//, 'build/'),
|
filePath.replace(/bundle\//, 'build/'),
|
||||||
filePath,
|
filePath,
|
||||||
|
@ -19,7 +19,6 @@ setTimeout(() => {
|
|||||||
}
|
}
|
||||||
fs.readFile(path, 'utf-8', (error, data) => {
|
fs.readFile(path, 'utf-8', (error, data) => {
|
||||||
if (!path.endsWith('.map')) {
|
if (!path.endsWith('.map')) {
|
||||||
console.log('File change:', path)
|
|
||||||
try {
|
try {
|
||||||
const sourceMap = doMerge(path + ".map")
|
const sourceMap = doMerge(path + ".map")
|
||||||
ws.connections.forEach(e => {
|
ws.connections.forEach(e => {
|
||||||
|
Reference in New Issue
Block a user