Skip to content

Commit

Permalink
fix: assert
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinbao1001 committed Aug 22, 2024
1 parent 4b93f51 commit dc87148
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/builder/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,13 @@ export function normalizeUserConfig(
typeof outputConfig === 'object'
? outputConfig
: { path: outputConfig };
if (singleConfig.generateUnminified) {
assert(
!entryOutput.filename?.includes('.min'),
'if set generateUnminified enabled, you need to delete ".min" in the output filename config',
);
}
assert(
!(
singleConfig.generateUnminified &&
entryOutput.filename?.includes('.min')
),
'if set generateUnminified enabled, you need to delete ".min" in the output filename config',
);

const minifiedConfig = {
...bundleConfig,
Expand Down

0 comments on commit dc87148

Please sign in to comment.