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

Use correct import.meta.url in config files #4005

Merged
merged 1 commit into from
Mar 22, 2021

Conversation

lukastaegert
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:
Resolves #3758

Description

This will make sure import.meta.url behaves as expected inside plugins that are imported via relative paths. Previously, import.meta.url would be the file url of the config file instead.

@rollup-bot
Copy link
Collaborator

Thank you for your contribution! ❤️

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

npm install rollup/rollup#gh-3758_correct_config_import_meta

or load it into the REPL:
https://rollupjs.org/repl/?circleci=14634

@codecov
Copy link

codecov bot commented Mar 21, 2021

Codecov Report

Merging #4005 (896a22e) into master (ff8067b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4005   +/-   ##
=======================================
  Coverage   97.24%   97.24%           
=======================================
  Files         192      192           
  Lines        6755     6759    +4     
  Branches     1971     1973    +2     
=======================================
+ Hits         6569     6573    +4     
  Misses         99       99           
  Partials       87       87           
Impacted Files Coverage Δ
cli/run/loadConfigFile.ts 96.00% <100.00%> (+0.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff8067b...896a22e. Read the comment docs.

@lukastaegert lukastaegert merged commit e2f68b0 into master Mar 22, 2021
@lukastaegert lukastaegert deleted the gh-3758_correct_config_import_meta branch March 22, 2021 04:58
@ctjlewis
Copy link

Great work, Lukas! Sorry I was not more helpful on this issue.

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.

rollup --config re-computes imported import.meta.url
3 participants