From 48cc402a917d6011c7d3e75f779f11ef91b474fb Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Thu, 10 Aug 2023 21:13:24 -0400 Subject: [PATCH] Build: replace CRLF with LF during minify - SWC is not respecting the git setting and does not have an option to force LF. This fixes the build on Windows. Close gh-5305 --- build/tasks/minify.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/tasks/minify.js b/build/tasks/minify.js index 1a6ddbd4a..6d3c6c568 100644 --- a/build/tasks/minify.js +++ b/build/tasks/minify.js @@ -34,7 +34,8 @@ module.exports = ( grunt ) => { } ); - grunt.file.write( dest, code ); + // Can't seem to get SWC to not use CRLF on Windows, so replace them with LF. + grunt.file.write( dest, code.replace( /\r\n/g, "\n" ) ); if ( sourceMapFilename ) { -- 2.39.5