Skip to content

Commit

Permalink
fix: provided lodash properly in browser env
Browse files Browse the repository at this point in the history
  • Loading branch information
chulanovskyi-bs committed Oct 29, 2024
1 parent 046dd4c commit 06a97b3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions esbuild.package.js
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ const fs = require('fs');
const path = require('path');
const esbuild = require('esbuild');
const { clean } = require('esbuild-plugin-clean');
const { copy } = require('esbuild-plugin-copy');
const { copyFolderFiles, addReleaseFlag } = require('@hackolade/hck-esbuild-plugins-pack');
const { EXCLUDED_EXTENSIONS, EXCLUDED_FILES, DEFAULT_RELEASE_FOLDER_PATH } = require('./buildConstants');

@@ -22,10 +23,17 @@ esbuild
outdir: RELEASE_FOLDER_PATH,
minify: true,
logLevel: 'info',
external: ['lodash'],
plugins: [
clean({
patterns: [DEFAULT_RELEASE_FOLDER_PATH],
}),
copy({
assets: {
from: [path.join('node_modules', 'lodash', '**', '*')],
to: [path.join('node_modules', 'lodash')],
},
}),
copyFolderFiles({
fromPath: __dirname,
targetFolderPath: RELEASE_FOLDER_PATH,

0 comments on commit 06a97b3

Please sign in to comment.