Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@TrickyPi
Copy link
Member

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:
#5694

Description

Add the missing import attributes for the hooks load, transform and renderDynamicImport. For the upcoming breaking changes for complete resolving #5694, add a warning when returning attributes from load or transform with strictDeprecations enabled.
cc @sapphi-red , It would be appreciated to get your feedback on whether the API extensions are satisfactory for you.

@vercel
Copy link

vercel bot commented Oct 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2025 0:43am

@github-actions
Copy link

github-actions bot commented Oct 24, 2024

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#feat/different-import-attributes

Notice: Ensure you have installed the latest nightly Rust toolchain. If you haven't installed it yet, please see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust.

or load it into the REPL:
https://rollup-3mtuhk5s3-rollup-js.vercel.app/repl/?pr=5700

@github-actions
Copy link

github-actions bot commented Oct 24, 2024

Performance report

  • BUILD: 7298ms, 817 MB
    • initialize: 0ms, 24.8 MB
    • generate module graph: 2671ms, 627 MB
      • generate ast: 1411ms, 619 MB
    • sort and bind modules: 424ms, 678 MB
    • mark included statements: 4125ms, 817 MB
      • treeshaking pass 1: 2433ms, 814 MB
      • treeshaking pass 2: 476ms, 827 MB
      • treeshaking pass 3: 410ms, 818 MB
      • treeshaking pass 4: 397ms, 832 MB
      • treeshaking pass 5: 398ms, 817 MB
  • GENERATE: 835ms (-224ms, -21.2%), 953 MB (+4%)
    • initialize render: 0ms, 901 MB
    • generate chunks: 147ms (-69ms, -31.9%), 861 MB
      • optimize chunks: 0ms, 850 MB
    • render chunks: 653ms (-130ms, -16.6%), 926 MB (+4%)
    • transform chunks: 19ms, 953 MB (+4%)
    • generate bundle: 0ms, 953 MB (+4%)

@codecov
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.79%. Comparing base (e4082a8) to head (196d1e1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5700   +/-   ##
=======================================
  Coverage   98.79%   98.79%           
=======================================
  Files         271      271           
  Lines       10601    10609    +8     
  Branches     2830     2835    +5     
=======================================
+ Hits        10473    10481    +8     
  Misses         88       88           
  Partials       40       40           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lukastaegert
Copy link
Member

In ResolveIdHook, do we also want to add importerAttributes separately?

@TrickyPi
Copy link
Member Author

TrickyPi commented Oct 27, 2024

Yeah, I think it can be included in the options parameter, just like attributes.

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking through the code besides adding importerAttributes to ResolveIdHook, the only thing missing to release this from my side is to adapt the types on the website.

@TrickyPi
Copy link
Member Author

the only thing missing to release this from my side is to adapt the types on the website

Yeah, I’ll update the website after adding importerAttributes.

@jogibear9988
Copy link

Is there anything holding this back?
I use json and css imports in all of my projects, and would really love to see a bundler support them.

@lukastaegert lukastaegert force-pushed the master branch 2 times, most recently from 5369863 to 96b5453 Compare November 7, 2025 21:32
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.

5 participants