diff --git a/build/gulpfile.editor.js b/build/gulpfile.editor.js index 7f52fbff355..bc11c8b5034 100644 --- a/build/gulpfile.editor.js +++ b/build/gulpfile.editor.js @@ -197,7 +197,7 @@ const compileEditorESMTask = task.define('compile-editor-esm', () => { }); function toExternalDTS(contents) { - let lines = contents.split('\n'); + let lines = contents.split(/\r\n|\r|\n/); let killNextCloseCurlyBrace = false; for (let i = 0; i < lines.length; i++) { let line = lines[i];