Преглед изворни кода

Added regex comments to rollup.config

Mr.doob пре 8 година
родитељ
комит
86424d9b31
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      rollup.config.js

+ 3 - 3
rollup.config.js

@@ -8,9 +8,9 @@ function glsl() {
 
 			var transformedCode = 'export default ' + JSON.stringify(
 				code
-					.replace( /[ \t]*\/\/.*\n/g, '' )
-					.replace( /[ \t]*\/\*[\s\S]*?\*\//g, '' )
-					.replace( /\n{2,}/g, '\n' )
+					.replace( /[ \t]*\/\/.*\n/g, '' ) // remove //
+					.replace( /[ \t]*\/\*[\s\S]*?\*\//g, '' ) // remove /* */
+					.replace( /\n{2,}/g, '\n' ) // # \n+ to \n
 			) + ';';
 			return {
 				code: transformedCode,