Przeglądaj źródła

fix(rollup): Fixed the judgment.

linbingquan 4 lat temu
rodzic
commit
88da05623e
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      utils/build/rollup.config.js

+ 2 - 2
utils/build/rollup.config.js

@@ -209,7 +209,7 @@ function glsl() {
 
 			if ( /\.glsl.js$/.test( id ) === false ) return;
 
-			code = code.replace( /\/\* glsl \*\/\`((.|\n)*)\`/, function ( match, p1 ) {
+			code = code.replace( /\/\* glsl \*\/\`((.|\r|\n)*)\`/, function ( match, p1 ) {
 
 				return JSON.stringify(
 					p1
@@ -274,7 +274,7 @@ function polyfills() {
 
 		transform( code, filePath ) {
 
-			if ( filePath.endsWith( 'src/Three.js' ) ) {
+			if ( filePath.endsWith( 'src/Three.js' ) || filePath.endsWith( 'src\\Three.js' ) ) {
 
 				code = "import './polyfills';\n" + code;