Skip to content

Commit

Permalink
chore: enable transformLodash for package which use @scripts/build (#…
Browse files Browse the repository at this point in the history
…4737)

* chore: enable transformLodash for package which use @scripts/build

* Delete .changeset/strong-brooms-jog.md

---------

Co-authored-by: neverland <[email protected]>
  • Loading branch information
10Derozan and chenjiahan authored Sep 27, 2023
1 parent 1d28a95 commit 6cefc06
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/build/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

const externalHelpers = true;
const transformLodash = true;
const skipDts = process.env.SKIP_DTS === 'true';
const dtsConfig = skipDts ? false : {};

Expand All @@ -18,6 +19,7 @@ const nodeBuildConfig = [
dts: false,
outDir: './dist/cjs',
externalHelpers,
transformLodash,
},
{
buildType: 'bundleless',
Expand Down Expand Up @@ -62,6 +64,7 @@ const universalBuildConfig = [
dts: false,
outDir: './dist/cjs',
externalHelpers,
transformLodash,
},
{
buildType: 'bundleless',
Expand All @@ -70,6 +73,7 @@ const universalBuildConfig = [
dts: false,
outDir: './dist/esm',
externalHelpers,
transformLodash,
},
{
buildType: 'bundleless',
Expand All @@ -78,6 +82,7 @@ const universalBuildConfig = [
dts: false,
outDir: './dist/esm-node',
externalHelpers,
transformLodash,
},
skipDts
? null
Expand All @@ -101,6 +106,7 @@ const universalBuildConfigWithBundle = [
dts: false,
outDir: './dist/cjs',
externalHelpers,
transformLodash,
},
{
buildType: 'bundle',
Expand All @@ -109,6 +115,7 @@ const universalBuildConfigWithBundle = [
dts: false,
outDir: './dist/esm',
externalHelpers,
transformLodash,
},
{
buildType: 'bundleless',
Expand All @@ -117,6 +124,7 @@ const universalBuildConfigWithBundle = [
dts: false,
outDir: './dist/esm-node',
externalHelpers,
transformLodash,
},
skipDts
? null
Expand All @@ -126,7 +134,6 @@ const universalBuildConfigWithBundle = [
only: true,
},
outDir: './dist/types',
externalHelpers,
},
].filter(Boolean);

Expand All @@ -151,6 +158,7 @@ const tscLikeBuildConfig = [
target: 'es2019',
outDir: './dist',
externalHelpers,
transformLodash,
dts: dtsConfig,
},
];
Expand Down

0 comments on commit 6cefc06

Please sign in to comment.