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

refactor!: rename autoImports to imports #528

Merged
merged 1 commit into from
Sep 14, 2022

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

vueuse/vueuse#2176

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR is the equivalent of nuxt/framework#6864 for Nuxt Bridge to keep the project in alignment with Nuxt 3.


As this feature now goes beyond just auto-imports, the naming autoImports as become a bit confusing and ambiguous. See nuxt/framework#6768 for more. This PR renames Nuxt option autoImports to imports and hooks autoImports:* to imports:*. This also aligns with components option.

πŸ‘‰ Migration

⚠️ Breaking change: Nuxt option autoImports named to imports. Hooks autoImports:* renamed to imports:*.

for nuxt.config.ts:

  export default defineNuxtConfig({
    bridge: {
-     autoImports: true,
+     imports: true,
    },
-   autoImports: {
+   imports: {
      // 
    },
  })

for module authors:

-nuxt.hook('autoImports:extend', () => { })
+nuxt.hook('imports:extend', () => { })

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe requested review from pi0 and antfu September 13, 2022 15:15
@danielroe danielroe self-assigned this Sep 13, 2022
Copy link
Member

@antfu antfu left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@danielroe danielroe merged commit 74c3f4f into main Sep 14, 2022
@danielroe danielroe deleted the refactor/auto-imports-rename branch September 14, 2022 09:24
@danielroe danielroe mentioned this pull request Jun 20, 2023
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.

None yet

2 participants