Skip to content

chore(vite): add define config - #33

Merged
userquin merged 1 commit into
mainfrom
userquin/add-define-config
Oct 17, 2026
Merged

userquin merged 1 commit into
mainfrom
userquin/add-define-config

Conversation

@userquin

@userquin userquin commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Description

This PR includes the external options and definePwaConfig to allow externalize the pwa configuration: included both, config/types and config subpackages exports.

This PR also includes small changes at core types: we should remove Vite or change some jsdocs.

Linked Issues

Refs #5

Additional Context

Summary by CodeRabbit

  • New Features
    • Added definePwaConfig to provide typed configuration for Vite PWA settings.
    • Added package exports for accessing the Vite configuration module and its type declarations.
  • Documentation
    • Clarified that the configured base applies to the app and may default to the value provided by Vite or its integration.

@github-actions github-actions Bot added pkg: core Changes affecting the core package pkg: vite Changes affecting the vite build package labels Oct 17, 2026
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ef9fd089-0552-42a8-aa14-db5674cd84c4
📥 Commits

Reviewing files that changed from the base of the PR and between d404f04 and d258c13.

📒 Files selected for processing: 6
  • packages/core/src/types.ts
  • packages/vite/package.json
  • packages/vite/src/node/config/index.ts
  • packages/vite/src/node/config/types.ts
  • packages/vite/src/node/vite-context.ts
  • packages/vite/tsdown.config.mts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The Vite package adds a typed configuration helper and public exports for its configuration module and types. The changes also update the base option description and context type import path, and add post-build JavaScript type cleanup.

Changes: Vite configuration

Layer / File(s) Summary
Config helper and public types
packages/core/src/types.ts, packages/vite/src/node/config/*, packages/vite/package.json, packages/vite/src/node/vite-context.ts
Adds definePwaConfig and the ExternalPWAOptions type, exposes config entry points, and updates the base description and context type import path.
Build configuration and cleanup
packages/vite/tsdown.config.mts
Derives cwd from the config URL, removes webpack and rspack from deps.neverBundle, and runs cleanupJSTypes(cwd) after the build.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to d258c

The PR adds a typed configuration helper and public exports. The build configuration is consistent with those exports, and the bundler-exclusion change does not affect the inspected package graph; no concrete merge-blocking risk remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 5 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title is concise, follows the conventional commit format, and clearly identifies the addition of the Vite configuration helper.
Description check Passed The description explains the addition of external options and definePwaConfig, identifies the affected exports, references a linked issue, and provides additional context about the core type changes.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 5 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@unplugin-pwa/core@33
pnpm add https://pkg.pr.new/@unplugin-pwa/inspector@33
pnpm add https://pkg.pr.new/@unplugin-pwa/types@33
pnpm add https://pkg.pr.new/@unplugin-pwa/vite@33

commit: d258c13

@userquin
userquin merged commit d513072 into main Oct 17, 2026
12 checks passed
@userquin
userquin deleted the userquin/add-define-config branch October 17, 2026 14:03
@github-actions github-actions Bot mentioned this pull request Oct 16, 2026
@userquin userquin mentioned this pull request Oct 17, 2026
10 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: core Changes affecting the core package pkg: vite Changes affecting the vite build package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant