Skip to content

WXT migration plan #1023

Description

@wxharry

branch: refactor-framework-2-wxt

Framework

  • Add WXT config split into wxt.config.ts, wxt.config.shared.ts, and wxt.config.server.ts
  • Switch package scripts to WXT (build, dev, zip, dev:server, dev:github)
  • Add WXT entrypoints for background, popup, options, sandbox, GitHub content, and Gitee content
  • Generate/update WXT type artifacts under .wxt/
  • Remove the old webpack build stack (webpack.config.js, utils/build.js, utils/server.js, utils/crx-webpack-plugin/, utils/env.js)

Features

  • Migrate developer-activity-openrank-trends to a WXT content-script entrypoint
  • Migrate developer-hovercard-info to a WXT content-script entrypoint
  • Migrate developer-networks to a WXT content-script entrypoint
  • Migrate perceptor-layout to a WXT content-script entrypoint
  • Migrate perceptor-tab to a WXT content-script entrypoint
  • Keep legacy feature loading for the remaining imported content scripts through src/pages/ContentScripts/index.ts
  • Migrate the remaining legacy feature bootstrap files (fast-pr, oss-gpt, and the repo-* features) to WXT entrypoints or confirm they should stay on the legacy loader
  • Remove old src/pages/ContentScripts/features/* bootstrap files after each feature has a WXT replacement
  • Decide how FeatureConfigs metadata (stage, dependency) should be surfaced in the UI or feature gating

Options and storage

  • Add src/features.config.ts for WXT-native feature flags
  • Add src/imported-features.ts for the remaining legacy feature list
  • Update src/options-storage.ts defaults to combine imported features with FeatureConfigs
  • Update the options page to render the new config-driven feature list
  • Clean up any remaining old feature-toggle assumptions once the last legacy feature is migrated

CI/CD

  • Update GitHub Actions workflows to align with the WXT build output and release artifacts
  • Verify deploy/release packaging still matches the generated extension directory
  • Remove any remaining webpack-era wording or path assumptions from workflow docs and scripts

Testing

  • Update e2e extension-path resolution to accept WXT output directories (.output/chrome-mv3*) and build
  • Update popup/options e2e coverage to use the new WXT pages
  • Add or refresh e2e coverage for the newly migrated content-script entrypoints
  • Re-run and stabilize the unit/e2e suite around WXT background and content-script behavior

Cleanup and docs

  • Remove the old manifest file (src/manifest.json) and legacy page HTML files under src/pages/*
  • Replace the old background page with src/entrypoints/background.ts
  • Remove leftover TODOs in migrated entrypoints once the UX is finalized
  • Update contributor docs to describe the new WXT build/dev flow and output locations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions