Browse Source

Rollup: Clean up.

Mr.doob 4 years ago
parent
commit
4358f44df6
1 changed files with 3 additions and 5 deletions
  1. 3 5
      utils/build/rollup.config.js

+ 3 - 5
utils/build/rollup.config.js

@@ -1,7 +1,7 @@
 import babel from "@rollup/plugin-babel";
 import babel from "@rollup/plugin-babel";
 import { terser } from "rollup-plugin-terser";
 import { terser } from "rollup-plugin-terser";
 
 
-if ( ! String.prototype.replaceAll ) {
+if ( String.prototype.replaceAll === undefined ) {
 
 
 	String.prototype.replaceAll = function ( find, replace ) {
 	String.prototype.replaceAll = function ( find, replace ) {
 
 
@@ -248,13 +248,11 @@ function babelCleanup() {
 
 
 			}
 			}
 
 
-
 			code = code
 			code = code
 				.replace( commentOutside, commentInside )
 				.replace( commentOutside, commentInside )
 				.replace( doubleSpaces, '\t' )
 				.replace( doubleSpaces, '\t' )
 				.replace( danglingTabs, '' );
 				.replace( danglingTabs, '' );
 
 
-
 			return {
 			return {
 				code: code,
 				code: code,
 				map: null
 				map: null
@@ -346,7 +344,7 @@ export default [
 			{
 			{
 				format: 'umd',
 				format: 'umd',
 				name: 'THREE',
 				name: 'THREE',
-				file: 'build/three.min.js',
+				file: 'build/three.min.js'
 			}
 			}
 		]
 		]
 	},
 	},
@@ -360,7 +358,7 @@ export default [
 		output: [
 		output: [
 			{
 			{
 				format: 'esm',
 				format: 'esm',
-				file: 'build/three.module.js',
+				file: 'build/three.module.js'
 			}
 			}
 		]
 		]
 	}
 	}