Skip to content

feat: Migrate to vite - #314

Open
ShrimpCryptid wants to merge 16 commits into
fix/use-css-modulesfrom
feat/use-vite
Open

ShrimpCryptid wants to merge 16 commits into
fix/use-css-modulesfrom
feat/use-vite

Conversation

@ShrimpCryptid

@ShrimpCryptid ShrimpCryptid commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Closes #312, "Migrate to vite."

Estimated review size: small, 15-20 minutes

Solution

  • Switches build tooling to vite from webpack.
  • Bumps typescript config targeting versions for compatibility with new Vite env variable import style (import.meta.env)
  • Updates env variable constant patterns.
  • Removes postcss- and webpack-related dependencies.
    • Note that webpack is still installed due to plotly.js dependency.
  • Removes other unused dependencies from the project.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Steps to Verify:

  1. Open PR preview: https://allencell.github.io/cell-feature-explorer/pr-preview/pr-314/
  2. CFE should render and be interactive as normal.

Screenshots (optional):

{71F8E908-D4A8-4A34-A3C5-2AFBF8D4CC99}

Keyfiles (delete if not relevant):

  1. vite.config.js
  2. package.json

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.6.3

🚀 View preview at
https://AllenCell.github.io/cell-feature-explorer/pr-preview/pr-314/

Built to branch gh-pages at 2026-10-15 22:04 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Comment thread package.json
"vitest": "^3.2.4"
},
"dependencies": {
"@aics/browsing-context-messaging": "~1.1",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm fairly certain that this is no longer being used... going to remove it in a follow-up PR

Comment thread README.md

| Env var | Default | Options |
| ------- |-------- |---------|
|`DEPLOYMENT_ENV` | dev | "dev", "staging", "production" |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This env var was not set or used.

@ShrimpCryptid
ShrimpCryptid added this pull request to stack #315 October 15, 2026 18:13
@ShrimpCryptid ShrimpCryptid changed the title Feat/use vite feat: Migrate to vite Oct 15, 2026
@ShrimpCryptid
ShrimpCryptid requested a balanced review from Copilot October 15, 2026 18:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

CSS export naming breaks annotation styling, and the default asset base breaks subdirectory-hosted previews.

2 open findings
What changed in this PR

Migrates Cell Feature Explorer from webpack to Vite, addressing #312.

Changes:

  • Replaces webpack tooling and scripts with Vite.
  • Moves environment flags to Vite-backed constants.
  • Updates assets, TypeScript settings, and development documentation.
File Description
webpack/​webpack.config.js Removes webpack configuration.
webpack/​plugins.js Removes webpack plugins.
webpack/​constants.js Removes webpack-specific constants.
vite.config.js Configures Vite builds and development.
typings/​images.d.ts Declares image imports.
tsconfig.json Updates module output setting.
tsconfig.base.json Updates TypeScript compilation targets.
src/​vite-env.d.ts Declares Vite environment types.
src/​styles/​README.md Removes webpack styling documentation.
src/​state/​image-dataset/​reducer.ts Uses the centralized dataset flag.
src/​state/​image-dataset/​firebase/​configure-firebase.ts Uses the centralized database flag.
src/​state/​configure-store.ts Uses the centralized DevTools flag.
src/​constants/​index.ts Reads Vite environment flags.
src/​components/​Icons/​index.tsx Updates the logo import path.
src/​assets/​images/​AICS-logo-full.png Adds the bundled logo asset.
README.md Updates local development instructions.
public/​images/​icon-CFE.png Adds a public icon asset.
public/​images/​favicon.ico Adds the public favicon.
package.json Replaces webpack scripts and dependencies.
index.html Adds the Vite application entry point.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread vite.config.js
Comment thread vite.config.js Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The ignored basename setting breaks asset loading for subdirectory deployments without an explicit CLI override.

1 open finding
2 resolved since last review

🧠 Review effort: Balanced

Comment thread vite.config.js Outdated
@ShrimpCryptid
ShrimpCryptid marked this pull request as ready for review October 15, 2026 21:09
@ShrimpCryptid
ShrimpCryptid requested a review from a team as a code owner October 15, 2026 21:09
@ShrimpCryptid
ShrimpCryptid requested review from frasercl and rugeli and removed request for a team October 15, 2026 21:09

@frasercl frasercl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! Excited to have fewer dependencies, fewer LOC, fewer plugins, fewer config files...

import { LoadingOutlined } from "@ant-design/icons";
import AicsLogoWhite from "../../images/AICS-logo-full.png";

import AicsLogoWhite from "../../assets/images/AICS-logo-full.png";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just curious (maybe I should know this already)... is there a vite reason that images had to move, or did you just think this was a nicer place to put them? (No problems either way, to be extra clear.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved them just for project organization, to match how we handle it in other projects. Not required though!

Comment thread webpack/plugins.js

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

kill!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

killing!!

Comment thread webpack/webpack.config.js

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

KILL!!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

KILLING!!!!

This branch has not been deployed

No deployments
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.

Migrate to vite

4 participants