Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate site to Vite and Vike for SSG #160

Merged
merged 32 commits into from
Feb 1, 2024
Merged

Migrate site to Vite and Vike for SSG #160

merged 32 commits into from
Feb 1, 2024

Conversation

mrm007
Copy link
Collaborator

@mrm007 mrm007 commented Jan 30, 2024

  • Replaced Gatsby with Vite + Vike for SSG
  • Syntax highlighting is now done client-side only. This avoids issues with SSR, hydration errors, and makes the site snappier.
  • Upgraded a lot of dependencies
    • Dev deps: Node.js 20, pnpm 8, TypeScript 5.3
    • Major libs: Emotion 11, Chakra UI v2, React v18
    • Minor libs: Downshift 8, React Syntax Highlighter 15
    • Uplifted TSConfig options
  • Tested Corepack in CI instead of using pnpm/action-setup which displays a warning about Node.js 16

Copy link

changeset-bot bot commented Jan 30, 2024

⚠️ No Changeset found

Latest commit: 397f0eb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines -4 to +5
import fontkit, { Font as FontKitFont } from 'fontkit';
import * as fontkit from 'fontkit';
import type { Font as FontKitFont } from 'fontkit';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This doesn't change the behaviour of the compiled code, so a changeset is not warranted IMO.

@mrm007 mrm007 marked this pull request as ready for review January 31, 2024 07:20
@mrm007 mrm007 requested a review from a team as a code owner January 31, 2024 07:20
Copy link

@askoufis askoufis left a comment

Choose a reason for hiding this comment

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

Just something I noticed, but font-feature-settings: "kern" is on body now, from chakra. Seems to only make a noticeable difference in firefox 🤷 though.

site/vite.config.ts Outdated Show resolved Hide resolved
@askoufis
Copy link

askoufis commented Feb 1, 2024

Noticed that clicking the autosuggest displays a blank suggestions list.

capsize.site.autosuggest.bug.mov


import { useAppState } from '../components/AppStateContext';
import Heading from '../components/Heading';
import { precomputeValues } from '@capsizecss/core';

const css = dedent;
Copy link
Contributor

Choose a reason for hiding this comment

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

Given we are using both below, maybe just remove the alias and use dedent explicitly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I aliased dedent to css so Prettier can format the tagged string: Prettier playground.

site/src/components/Seo.tsx Outdated Show resolved Hide resolved
import path from 'node:path';
import process from 'node:process';
import ghpages from 'gh-pages';
import repoPkg from '../../package.json' assert { type: 'json' };
Copy link

Choose a reason for hiding this comment

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

💅

@mrm007 mrm007 merged commit b764072 into master Feb 1, 2024
6 checks passed
@mrm007 mrm007 changed the title Migrate site to Vite + Vike Migrate site to Vite and Vike for SSG Feb 1, 2024
@mrm007 mrm007 deleted the vite branch February 1, 2024 23:30
@stefanhamburger stefanhamburger mentioned this pull request Feb 6, 2024
michaeltaranto added a commit that referenced this pull request Feb 14, 2024
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.

3 participants