8000 warn.code for missing output.name of IIFE bundle that has export (#3372) · rollup/rollup@97b8c40 · GitHub
[go: up one dir, main page]

Skip to content

Commit 97b8c40

Browse files
rail44lukastaegert
andauthored
warn.code for missing output.name of IIFE bundle that has export (#3372)
* warn.code for missing output.name of IIFE bundle that has export * Make warning code slightly more descriptive Co-authored-by: Lukas Taegert-Atkinson <lukastaegert@users.noreply.github.com> Co-authored-by: Lukas Taegert-Atkinson <lukas.taegert-atkinson@tngtech.com>
1 parent eeda078 commit 97b8c40

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/finalisers/iife.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export default function iife(
4949

5050
if (hasExports && !name) {
5151
warn({
52+
code: 'MISSING_NAME_OPTION_FOR_IIFE_EXPORT',
5253
message: `If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.`
5354
});
5455
}

test/function/samples/warn-missing-iife-name/_config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module.exports = {
33
options: { output: { format: 'iife' } },
44
warnings: [
55
{
6+
code: 'MISSING_NAME_OPTION_FOR_IIFE_EXPORT',
67
message:
78
'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.'
89
}

0 commit comments

Comments
 (0)
0