-
Notifications
You must be signed in to change notification settings - Fork 699
Closed
Description
Thought about this when reviewing #6747.
## warnings
### EMPTY_IMPORT_META
\```text
[EMPTY_IMPORT_META] Warning: `import.meta` is not available with the `iife` output format and will be empty.
╭─[ main.js:1:13 ]
│
1 │ console.log(import.meta.hello);
│ ─────┬─────
│ ╰─────── You need to set the output format to `esm` for `import.meta` to work correctly.
───╯
\```
- "
import.metais not available with theiifeoutput format " is bit of confusing. Should be something like: "Your output format.iifemight run into errors when havingimport.mets". Also point out thatimport.metawill be replaced with{}due to so. iifeformat will enableinlineDynamicImportsby default, whileesmdoesn't. Helper message should point out how to achieve the same result.- If users want to continue on
iffeformat, help message doesn't provide workaround solution for solving this warning. Should point out that, to remove the warning, users could usetransform.defineto replaceimport.metawith{}explicitly if they want to continue usingiifeformat
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels