Skip to content

Commit

Permalink
more explained error code for name-less umd bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
Satoshi Amemiya committed Feb 20, 2020
1 parent bbfe4a5 commit 85134f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/finalisers/umd.ts
Expand Up @@ -44,8 +44,8 @@ export default function umd(

if (hasExports && !options.name) {
return error({
code: 'INVALID_OPTION',
message: 'You must supply "output.name" for UMD bundles.'
code: 'MISSING_NAME_FOR_EXPORT',
message: 'You must supply "output.name" for UMD bundles that have exports.'
});
}

Expand Down
2 changes: 1 addition & 1 deletion test/function/samples/error-missing-umd-name/_config.js
Expand Up @@ -2,7 +2,7 @@ module.exports = {
description: 'throws an error if no name is provided for a UMD bundle',
options: { output: { format: 'umd' } },
generateError: {
code: 'INVALID_OPTION',
code: 'MISSING_NAME_FOR_EXPORT',
message: 'You must supply "output.name" for UMD bundles.'
}
};

0 comments on commit 85134f4

Please sign in to comment.