File tree Expand file tree Collapse file tree 3 files changed +1166
-498
lines changed
build/build-modules-js/javascript Expand file tree Collapse file tree 3 files changed +1166
-498
lines changed Original file line number Diff line number Diff line change 33} from 'node:fs/promises' ;
44import { resolve } from 'node:path' ;
55import { transform } from 'esbuild' ;
6- import rimraf from 'rimraf' ;
6+ import { rimrafSync } from 'rimraf' ;
77import { rollup } from 'rollup' ;
88import { nodeResolve } from '@rollup/plugin-node-resolve' ;
99import replace from '@rollup/plugin-replace' ;
@@ -65,6 +65,13 @@ const build = async () => {
6565 ] ,
6666 } ) ,
6767 ] ,
68+ } ) ;
69+
70+ await bundle . write ( {
71+ format : 'es' ,
72+ sourcemap : false ,
73+ dir : outputFolder ,
74+ chunkFileNames : '[name].js' ,
6875 manualChunks : {
6976 alert : [ 'build/media_source/vendor/bootstrap/js/alert.es6.js' ] ,
7077 button : [ 'build/media_source/vendor/bootstrap/js/button.es6.js' ] ,
@@ -86,19 +93,12 @@ const build = async () => {
8693 } ,
8794 } ) ;
8895
89- await bundle . write ( {
90- format : 'es' ,
91- sourcemap : false ,
92- dir : outputFolder ,
93- chunkFileNames : '[name].js' ,
94- } ) ;
95-
9696 // closes the bundle
9797 await bundle . close ( ) ;
9898} ;
9999
100100export const bootstrapJs = async ( ) => {
101- rimraf . sync ( resolve ( outputFolder ) ) ;
101+ rimrafSync ( resolve ( outputFolder ) ) ;
102102
103103 try {
104104 await build ( resolve ( inputFolder , 'index.es6.js' ) ) ;
You can’t perform that action at this time.
0 commit comments