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
This commit is contained in:
Timmy Willison 2023-08-10 21:13:24 -04:00 committed by GitHub
parent 8be4c0e4f8
commit 48cc402a91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 ) {