Skip to content

refactor(build): ビルド処理をWebpackからViteへ移行 - #18

Open
yhotta240 wants to merge 10 commits into
mainfrom
build/vite
Open

refactor(build): ビルド処理をWebpackからViteへ移行#18
yhotta240 wants to merge 10 commits into
mainfrom
build/vite

Conversation

@yhotta240

Copy link
Copy Markdown
Contributor

ビルド処理をWebpackからViteへ移行

変更内容:

  • WebpackからVite 8へ移行
  • background / popup をViteでビルド
  • content scriptをIIFE形式で個別ビルド
  • MarkdownとCHANGELOGのViteプラグイン化
  • 開発用自動リロードをVite対応
  • watchの二重起動を防止
  • 既存のrelease / packコマンドを維持
  • 不要なWebpack設定・ローダーを削除

Webpackについて:

Webpack時点の状態は legacy/webpack ブランチに保持してする.
このPRのマージ後,main はViteビルドになる.
WebpackとViteの両対応は行わない.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e5b8b70ef7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json Outdated
"author": "yhotta240",
"license": "MIT",
"engines": {
"node": "^22.0.0 || >=24.0.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Require the Node version mandated by Vite

Raise the Node 22 minimum to 22.12.0. The lockfile resolves Vite 8.2.2, whose own engine constraint is ^20.19.0 || >=22.12.0, while this range accepts Node 22.0–22.11 and the README recommends any v22.x release. In those accepted environments, installs with engine-strict fail, and other installs leave the build running on an unsupported Node version.

Useful? React with 👍 / 👎.

Comment on lines +20 to +21
this.addWatchFile(contentEntry);
this.addWatchFile(contentLogger);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Watch every content-script dependency

Avoid hard-coding only the entry point and logger into the parent watch graph. The nested build() is not itself in watch mode, so after src/content/index.ts imports another local module, subsequent edits to that module do not trigger npm run watch; dist/content.js remains stale and no extension reload is sent. This is especially likely in a starter kit where users are expected to extend the content script.

Useful? React with 👍 / 👎.

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