Pārlūkot izejas kodu

Build examples: Make the libs replace more generalized (#21882)

Marco Fugaro 4 gadi atpakaļ
vecāks
revīzija
db106b502a
1 mainītis faili ar 1 papildinājumiem un 6 dzēšanām
  1. 1 6
      utils/build/rollup.examples.config.js

+ 1 - 6
utils/build/rollup.examples.config.js

@@ -110,12 +110,7 @@ function unmodularize() {
 
 			// Remove library imports that are exposed as
 			// global variables in the non-module world
-			code = code.replace( 'import * as fflate from \'../libs/fflate.module.js\';', '' );
-			code = code.replace( 'import { MMDParser } from \'../libs/mmdparser.module.js\';', '' );
-			code = code.replace( 'import { potpack } from \'../libs/potpack.module.js\';', '' );
-			code = code.replace( 'import { opentype } from \'../libs/opentype.module.min.js\';', '' );
-			code = code.replace( 'import chevrotain from \'../libs/chevrotain.module.min.js\';', '' );
-			code = code.replace( 'import { ZSTDDecoder } from \'../libs/zstddec.module.js\';', '' );
+			code = code.replace( /import (.*) from '(.*)\/libs\/(.*)';/g, '' );
 
 			// remove newline at the start of file
 			code = code.trimStart();