From 4452e346206fe16cc34ecaf65552110ef11220b8 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Thu, 1 Aug 2024 08:52:02 +0900 Subject: [PATCH 1/4] chore: release vite-plugin-ssr-css v0.0.1 --- packages/ssr-css/CHANGELOG.md | 4 ++++ packages/ssr-css/package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/ssr-css/CHANGELOG.md b/packages/ssr-css/CHANGELOG.md index 6063eba2c..f9b7bca5a 100644 --- a/packages/ssr-css/CHANGELOG.md +++ b/packages/ssr-css/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v0.0.1 (2024-07-31) + +- fix: handle css virtual module via `ssrLoadModule` ([#589](https://github.com/hi-ogawa/vite-plugins/pull/589)) + ## v0.0.0 - fix: invalidate virtual module on each direct request ([#304](https://github.com/hi-ogawa/vite-plugins/pull/304)) diff --git a/packages/ssr-css/package.json b/packages/ssr-css/package.json index aa7024841..920b2043c 100644 --- a/packages/ssr-css/package.json +++ b/packages/ssr-css/package.json @@ -1,6 +1,6 @@ { "name": "@hiogawa/vite-plugin-ssr-css", - "version": "0.0.0", + "version": "0.0.1", "homepage": "https://github.com/hi-ogawa/vite-plugins/tree/main/packages/ssr-css", "repository": { "type": "git", From fd5bd031bcf5b6e68833ee27d5e9a8b4a60e9786 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Thu, 1 Aug 2024 08:53:12 +0900 Subject: [PATCH 2/4] chore: cleanup script --- packages/ssr-css/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/ssr-css/package.json b/packages/ssr-css/package.json index 920b2043c..0f8f60f97 100644 --- a/packages/ssr-css/package.json +++ b/packages/ssr-css/package.json @@ -19,8 +19,7 @@ "scripts": { "build": "tsup", "dev": "tsup --watch", - "prepack": "tsup --clean", - "release": "pnpm publish --no-git-checks --access public" + "prepack": "tsup --clean" }, "peerDependencies": { "vite": "*" From 913bde97c4700967c21c7abd74089ebf944a49d7 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Thu, 1 Aug 2024 08:53:33 +0900 Subject: [PATCH 3/4] chore: pkg-pr-new vite-plugin-ssr-css --- .github/workflows/pkg-pr-new.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pkg-pr-new.yml b/.github/workflows/pkg-pr-new.yml index fe4dba734..be182fdb0 100644 --- a/.github/workflows/pkg-pr-new.yml +++ b/.github/workflows/pkg-pr-new.yml @@ -15,4 +15,5 @@ jobs: packages/react-server \ packages/react-server-next \ packages/transforms \ - packages/vite-plugin-ssr-middleware + packages/vite-plugin-ssr-middleware \ + packages/vite-plugin-ssr-css From 6a0039371f59c2b03e7eedef7df1f755b21f478d Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Thu, 1 Aug 2024 08:59:13 +0900 Subject: [PATCH 4/4] chore: comment --- packages/ssr-css/src/collect.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/ssr-css/src/collect.ts b/packages/ssr-css/src/collect.ts index 6c29160db..d44c70331 100644 --- a/packages/ssr-css/src/collect.ts +++ b/packages/ssr-css/src/collect.ts @@ -3,6 +3,8 @@ import type { ViteDevServer } from "vite"; // style collection // https://github.com/remix-run/remix/blob/1a8a5216106bd8c3073cc3e5e5399a32c981db74/packages/remix-dev/vite/styles.ts // https://github.com/vikejs/vike/blob/f9a91f3c47cab9c2871526ef714cc0f87a41fda0/vike/node/runtime/renderPage/getPageAssets/retrieveAssetsDev.ts +// https://github.com/sveltejs/kit/blob/998edb26d431e4ee4d3b4dc792a86960a85a5b45/packages/kit/src/exports/vite/dev/index.js#L186-L219 +// https://github.com/withastro/astro/blob/6aaeec5034cabf6a83e1949ec1ca8f50e7978cc1/packages/astro/src/vite-plugin-astro-server/css.ts export async function collectStyle(server: ViteDevServer, entries: string[]) { const urls = await collectStyleUrls(server, entries);