Skip to content

Commit

Permalink
warn.code for missing output.name of IIFE bundle that has export
Browse files Browse the repository at this point in the history
  • Loading branch information
rail44 authored and Satoshi Amemiya committed Feb 6, 2020
1 parent 7c0417f commit 63cc2eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/finalisers/iife.ts
Expand Up @@ -49,6 +49,7 @@ export default function iife(

if (hasExports && !name) {
warn({
code: 'MISSING_NAME_FOR_EXPORT',
message: `If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.`
});
}
Expand Down
1 change: 1 addition & 0 deletions test/function/samples/warn-missing-iife-name/_config.js
Expand Up @@ -3,6 +3,7 @@ module.exports = {
options: { output: { format: 'iife' } },
warnings: [
{
code: 'MISSING_NAME_FOR_EXPORT',
message:
'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.'
}
Expand Down

0 comments on commit 63cc2eb

Please sign in to comment.