@@ -2,6 +2,7 @@ const fs = require('fs');
2
2
const path = require ( 'path' ) ;
3
3
const esbuild = require ( 'esbuild' ) ;
4
4
const { clean } = require ( 'esbuild-plugin-clean' ) ;
5
+ const { copy } = require ( 'esbuild-plugin-copy' ) ;
5
6
const { copyFolderFiles, addReleaseFlag } = require ( '@hackolade/hck-esbuild-plugins-pack' ) ;
6
7
const { EXCLUDED_EXTENSIONS , EXCLUDED_FILES , DEFAULT_RELEASE_FOLDER_PATH } = require ( './buildConstants' ) ;
7
8
@@ -11,6 +12,7 @@ const RELEASE_FOLDER_PATH = path.join(DEFAULT_RELEASE_FOLDER_PATH, `${packageDat
11
12
esbuild
12
13
. build ( {
13
14
entryPoints : [
15
+ path . resolve ( __dirname , 'api' , 'fe.js' ) ,
14
16
path . resolve ( __dirname , 'forward_engineering' , 'api.js' ) ,
15
17
path . resolve ( __dirname , 'reverse_engineering' , 'api.js' ) ,
16
18
] ,
@@ -21,10 +23,17 @@ esbuild
21
23
outdir : RELEASE_FOLDER_PATH ,
22
24
minify : true ,
23
25
logLevel : 'info' ,
26
+ external : [ 'lodash' ] ,
24
27
plugins : [
25
28
clean ( {
26
29
patterns : [ DEFAULT_RELEASE_FOLDER_PATH ] ,
27
30
} ) ,
31
+ copy ( {
32
+ assets : {
33
+ from : [ path . join ( 'node_modules' , 'lodash' , '**' , '*' ) ] ,
34
+ to : [ path . join ( 'node_modules' , 'lodash' ) ] ,
35
+ } ,
36
+ } ) ,
28
37
copyFolderFiles ( {
29
38
fromPath : __dirname ,
30
39
targetFolderPath : RELEASE_FOLDER_PATH ,
0 commit comments