@@ -2,6 +2,7 @@ const fs = require('fs');
22const path = require ( 'path' ) ;
33const esbuild = require ( 'esbuild' ) ;
44const { clean } = require ( 'esbuild-plugin-clean' ) ;
5+ const { copy } = require ( 'esbuild-plugin-copy' ) ;
56const { copyFolderFiles, addReleaseFlag } = require ( '@hackolade/hck-esbuild-plugins-pack' ) ;
67const { EXCLUDED_EXTENSIONS , EXCLUDED_FILES , DEFAULT_RELEASE_FOLDER_PATH } = require ( './buildConstants' ) ;
78
@@ -11,6 +12,7 @@ const RELEASE_FOLDER_PATH = path.join(DEFAULT_RELEASE_FOLDER_PATH, `${packageDat
1112esbuild
1213 . build ( {
1314 entryPoints : [
15+ path . resolve ( __dirname , 'api' , 'fe.js' ) ,
1416 path . resolve ( __dirname , 'forward_engineering' , 'api.js' ) ,
1517 path . resolve ( __dirname , 'reverse_engineering' , 'api.js' ) ,
1618 ] ,
@@ -21,10 +23,17 @@ esbuild
2123 outdir : RELEASE_FOLDER_PATH ,
2224 minify : true ,
2325 logLevel : 'info' ,
26+ external : [ 'lodash' ] ,
2427 plugins : [
2528 clean ( {
2629 patterns : [ DEFAULT_RELEASE_FOLDER_PATH ] ,
2730 } ) ,
31+ copy ( {
32+ assets : {
33+ from : [ path . join ( 'node_modules' , 'lodash' , '**' , '*' ) ] ,
34+ to : [ path . join ( 'node_modules' , 'lodash' ) ] ,
35+ } ,
36+ } ) ,
2837 copyFolderFiles ( {
2938 fromPath : __dirname ,
3039 targetFolderPath : RELEASE_FOLDER_PATH ,
0 commit comments