Skip to content

chore(build): add Vercel preview builds for framework test apps#31073

Open
ShaneK wants to merge 2 commits intomainfrom
chore/vercel-previews
Open

chore(build): add Vercel preview builds for framework test apps#31073
ShaneK wants to merge 2 commits intomainfrom
chore/vercel-previews

Conversation

@ShaneK
Copy link
Copy Markdown
Member

@ShaneK ShaneK commented Apr 9, 2026

Issue number: resolves internal


What is the current behavior?

Vercel preview deployments only build and serve core Stencil component test pages. Framework-specific test apps (Angular, React, Vue, React Router) are not included, requiring developers to pull and build locally to validate them.

What is the new behavior?

Vercel preview deployments build and serve framework test apps alongside core component tests under a single preview URL.

Does this introduce a breaking change?

  • Yes
  • No

Other information

@ShaneK ShaneK requested a review from a team as a code owner April 9, 2026 19:20
@ShaneK ShaneK requested a review from brandyscarney April 9, 2026 19:20
@github-actions github-actions bot added the package: react @ionic/react package label Apr 9, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview, Comment Apr 14, 2026 5:17pm

Request Review

@ShaneK ShaneK force-pushed the chore/vercel-previews branch from 3bbcabf to 5eb431e Compare April 9, 2026 19:23
@github-actions github-actions bot added the package: core @ionic/core package label Apr 9, 2026
@ShaneK ShaneK force-pushed the chore/vercel-previews branch from 5eb431e to 91aa59e Compare April 9, 2026 19:27
@ShaneK ShaneK force-pushed the chore/vercel-previews branch from 91aa59e to e4f45f1 Compare April 9, 2026 19:33
@ShaneK ShaneK force-pushed the chore/vercel-previews branch from e4f45f1 to e785090 Compare April 9, 2026 19:42
@ShaneK ShaneK force-pushed the chore/vercel-previews branch from e785090 to 60b1804 Compare April 9, 2026 19:48
@ShaneK ShaneK force-pushed the chore/vercel-previews branch from 60b1804 to b5c7660 Compare April 9, 2026 19:57
@ShaneK ShaneK force-pushed the chore/vercel-previews branch from b5c7660 to 2e41f54 Compare April 9, 2026 20:05
@ShaneK ShaneK force-pushed the chore/vercel-previews branch from 2e41f54 to 192f551 Compare April 9, 2026 20:12
@ShaneK ShaneK force-pushed the chore/vercel-previews branch from 192f551 to 99f295a Compare April 9, 2026 20:39
Copy link
Copy Markdown
Contributor

@thetaPC thetaPC left a comment

Choose a reason for hiding this comment

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

Mainly requesting for the sync command.

Question: Is it possible to add a way where we can determine if we want to build the frameworks? That way if we only need core then we don't have to wait for the others to build. It can be a label that is added to the PR or text command that is submitted through the comments, etc.


echo "=== Ionic Framework Preview Build ==="
echo "Core dir: ${CORE_DIR}"
echo "Repo root: ${REPO_ROOT:-NOT FOUND}"
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.

We get a warning if REPO_ROOT is not found later in the script, I wonder if it would be beneficial if we can move it after this echo as to remind the dev that there is no need for concern.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Comment on lines +137 to +150
build_angular_pkgs() {
(cd "${REPO_ROOT}/packages/angular" && npm install && npm run build) || return 1
(cd "${REPO_ROOT}/packages/angular-server" && npm install && npm run build) || return 1
}

build_react_pkgs() {
(cd "${REPO_ROOT}/packages/react" && npm install && npm run build) || return 1
(cd "${REPO_ROOT}/packages/react-router" && npm install && npm run build) || return 1
}

build_vue_pkgs() {
(cd "${REPO_ROOT}/packages/vue" && npm install && npm run build) || return 1
(cd "${REPO_ROOT}/packages/vue-router" && npm install && npm run build) || return 1
}
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.

These are missing the npm run sync command

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done, good catch!


build_angular_test() {
local APP
APP=$(pick_app "${REPO_ROOT}/packages/angular/test" ng20 ng19 ng18) || {
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.

Is it possible to make this dynamic? We would have to manually update the versions otherwise.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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


build_react_test() {
local APP
APP=$(pick_app "${REPO_ROOT}/packages/react/test" react19 react18) || {
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.

Is it possible to make this dynamic? We would have to manually update the versions otherwise.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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


build_vue_test() {
local APP
APP=$(pick_app "${REPO_ROOT}/packages/vue/test" vue3) || {
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.

Is it possible to make this dynamic? We would have to manually update the versions otherwise.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

const App: React.FC = () => (
<IonApp>
<IonReactRouter>
<IonReactRouter basename={import.meta.env?.BASE_URL?.replace(/\/$/, '') || undefined}>
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.

It might be helpful to add a comment of why basename is added so we avoid removing it because we don't remember it's importance.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@ShaneK
Copy link
Copy Markdown
Member Author

ShaneK commented Apr 14, 2026

RE: Your review comment:

Not really, unfortunately. If we relied on code-based suggestion, we'd be building most of the time anyway (we need to build them all any time core changes). If we went the tag route, we'd have to make some annoying changes to Vercel, including giving it a GitHub token to read that I think. I'm pretty sure what it currently has access to isn't enough to pull labels like that.

@ShaneK ShaneK requested a review from thetaPC April 14, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package package: react @ionic/react package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants