Skip to content

feat: add some warnings in IIFE and CJS.#1857

Merged
IWANABETHATGUY merged 9 commits intorolldown:mainfrom
7086cmd:feat/warnings-in-iife
Aug 4, 2024
Merged

feat: add some warnings in IIFE and CJS.#1857
IWANABETHATGUY merged 9 commits intorolldown:mainfrom
7086cmd:feat/warnings-in-iife

Conversation

@7086cmd
Copy link
Copy Markdown
Contributor

@7086cmd 7086cmd commented Aug 3, 2024

resolves #1855.

No name was provided for external module "node:path" in "output.globals" – guessing "node_path".
If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.
Entry module "main.js" is using named and default exports together. Consumers of your bundle will have to use `chunk.default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.

@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 3, 2024

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit af27218
🔍 Latest deploy log https://app.netlify.com/sites/rolldown-rs/deploys/66af803fba57f600085531a3

@IWANABETHATGUY
Copy link
Copy Markdown
Member

Can you see esbuild or rollup behavior?

@7086cmd
Copy link
Copy Markdown
Contributor Author

7086cmd commented Aug 3, 2024

Can you see esbuild or rollup behavior?

Here is a gather version in Rollup.

@IWANABETHATGUY
Copy link
Copy Markdown
Member

I assume they are both warning, but it display in Error

@7086cmd
Copy link
Copy Markdown
Contributor Author

7086cmd commented Aug 3, 2024

I'll fix them soon. It is a bug.

Comment thread crates/rolldown/src/ecmascript/format/iife.rs Outdated
@7086cmd 7086cmd changed the title feat: add some warnings in IIFE. feat: add some warnings in IIFE and CJS. Aug 4, 2024
Comment thread crates/rolldown/tests/rolldown/misc/footer/cjs/_config.json Outdated
@IWANABETHATGUY
Copy link
Copy Markdown
Member

LGTM

@hyf0 hyf0 requested a review from underfin August 4, 2024 10:30
@IWANABETHATGUY IWANABETHATGUY added this pull request to the merge queue Aug 4, 2024
Merged via the queue into rolldown:main with commit e7916ab Aug 4, 2024
@7086cmd 7086cmd deleted the feat/warnings-in-iife branch August 5, 2024 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants