Skip to content

feat: support external nuxt-ionic.config file#981

Open
imslepov wants to merge 1 commit into
nuxt-modules:mainfrom
imslepov:feat/config-file
Open

feat: support external nuxt-ionic.config file#981
imslepov wants to merge 1 commit into
nuxt-modules:mainfrom
imslepov:feat/config-file

Conversation

@imslepov

Copy link
Copy Markdown

🔗 Linked issue

❓ 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)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

The inline config option in nuxt.config is serialised with JSON.stringify, so it can't carry functions or values computed at runtime.

The nuxt-ionic.config file fixes this: the config is passed to the Ionic Vue plugin as-is, so functions and isPlatform() checks work.

// nuxt-ionic.config.ts
export default defineNuxtIonicConfig({
  backButtonText: 'Go back',
})
// or as a function, if you need runtime values
export default defineNuxtIonicConfig(() => {
  const backButtonText = isPlatform('ios') ? 'Go back' : undefined
  return { backButtonText }
})

@imslepov imslepov requested a review from danielroe as a code owner June 26, 2026 10:14
@netlify

netlify Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deploy Preview for friendly-lamington-fb5690 ready!

Name Link
🔨 Latest commit 1715e26
🔍 Latest deploy log https://app.netlify.com/projects/friendly-lamington-fb5690/deploys/6a3e5125999c7b000872eefc
😎 Deploy Preview https://deploy-preview-981--friendly-lamington-fb5690.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.56%. Comparing base (bd18764) to head (1715e26).

Files with missing lines Patch % Lines
src/parts/config.ts 66.66% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #981      +/-   ##
==========================================
+ Coverage   30.18%   32.56%   +2.38%     
==========================================
  Files          12       14       +2     
  Lines         328      347      +19     
  Branches       98      102       +4     
==========================================
+ Hits           99      113      +14     
- Misses        229      234       +5     

☔ View full report in Codecov by Harness.
📢 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.

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.

1 participant