Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warn.code for missing output.name of IIFE bundle that has export #3372

Merged
merged 5 commits into from Mar 6, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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