From 8ebbbe8bd5d580770e2349e9b761db0a9613264e Mon Sep 17 00:00:00 2001 From: Alduino Date: Wed, 26 Jun 2024 21:47:16 +1000 Subject: [PATCH] Fix build See https://github.com/vanilla-extract-css/vanilla-extract/issues/1403 for context --- package.json | 2 +- pnpm-lock.yaml | 54 ++++++++++++++++++++++++++++++++++++++++---------- vite.config.ts | 4 ++-- 3 files changed, 47 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 495f29e..d953821 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "@types/node": "^20.14.9", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "@vanilla-extract/vite-plugin": "^4.0.11", + "@vanilla-extract/vite-plugin": "^3.9.5", "@vitejs/plugin-react-swc": "^3.7.0", "prettier": "^3.3.2", "typescript": "^5.5.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 562946b..a782028 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -50,8 +50,8 @@ devDependencies: specifier: ^18.3.0 version: 18.3.0 '@vanilla-extract/vite-plugin': - specifier: ^4.0.11 - version: 4.0.11(@types/node@20.14.9)(vite@5.3.1) + specifier: ^3.9.5 + version: 3.9.5(@types/node@20.14.9)(vite@5.3.1) '@vitejs/plugin-react-swc': specifier: ^3.7.0 version: 3.7.0(vite@5.3.1) @@ -1048,19 +1048,20 @@ packages: '@vanilla-extract/private': 1.0.5 dev: false - /@vanilla-extract/integration@7.1.6(@types/node@20.14.9): - resolution: {integrity: sha512-5fDhW0Bm/MBG9B63On3dHl1tExcmvzG5hdrS9J8LR5qTIHuT5wIxeZ4LEhLgfqgl4b7PglGP+ey7N9rXb/FlOA==} + /@vanilla-extract/integration@6.5.0(@types/node@20.14.9): + resolution: {integrity: sha512-E2YcfO8vA+vs+ua+gpvy1HRqvgWbI+MTlUpxA8FvatOvybuNcWAY0CKwQ/Gpj7rswYKtC6C7+xw33emM6/ImdQ==} dependencies: '@babel/core': 7.24.7 '@babel/plugin-syntax-typescript': 7.24.7(@babel/core@7.24.7) '@vanilla-extract/babel-plugin-debug-ids': 1.0.6 '@vanilla-extract/css': 1.15.3 - dedent: 1.5.3 esbuild: 0.19.12 eval: 0.1.8 find-up: 5.0.0 javascript-stringify: 2.1.0 + lodash: 4.17.21 mlly: 1.7.1 + outdent: 0.8.0 vite: 5.3.1(@types/node@20.14.9) vite-node: 1.6.0(@types/node@20.14.9) transitivePeerDependencies: @@ -1086,12 +1087,15 @@ packages: '@vanilla-extract/css': 1.15.3 dev: false - /@vanilla-extract/vite-plugin@4.0.11(@types/node@20.14.9)(vite@5.3.1): - resolution: {integrity: sha512-8t9ErMKaUdaO1mykbtgQvnzOSWhXsr7wwTdxjd6j3nIHf049UbrrmNeA0On3x9+z7kDnIALYa9GhT3IICTDUdg==} + /@vanilla-extract/vite-plugin@3.9.5(@types/node@20.14.9)(vite@5.3.1): + resolution: {integrity: sha512-CWI/CtrVW6i3HKccI6T7uGQkTJ8bd8Xl2UMBg3Pkr7dwWMmavXTeucV0I9KSbmXaYXSbEj+Q8c9y0xAZwtmTig==} peerDependencies: - vite: ^4.0.3 || ^5.0.0 + vite: ^2.2.3 || ^3.0.0 || ^4.0.3 || ^5.0.0 dependencies: - '@vanilla-extract/integration': 7.1.6(@types/node@20.14.9) + '@vanilla-extract/integration': 6.5.0(@types/node@20.14.9) + outdent: 0.8.0 + postcss: 8.4.38 + postcss-load-config: 4.0.2(postcss@8.4.38) vite: 5.3.1(@types/node@20.14.9) transitivePeerDependencies: - '@types/node' @@ -1103,6 +1107,7 @@ packages: - sugarss - supports-color - terser + - ts-node dev: true /@vitejs/plugin-react-swc@3.7.0(vite@5.3.1): @@ -1412,6 +1417,11 @@ packages: hasBin: true dev: true + /lilconfig@3.1.2: + resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} + engines: {node: '>=14'} + dev: true + /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -1419,6 +1429,10 @@ packages: p-locate: 5.0.0 dev: true + /lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: true + /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -1480,6 +1494,10 @@ packages: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true + /outdent@0.8.0: + resolution: {integrity: sha512-KiOAIsdpUTcAXuykya5fnVVT+/5uS0Q1mrkRHcF89tpieSmY33O/tmc54CqwA+bfhbtEfZUNLHaPUiB9X3jt1A==} + dev: true + /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} @@ -1519,6 +1537,23 @@ packages: pathe: 1.1.2 dev: true + /postcss-load-config@4.0.2(postcss@8.4.38): + resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} + engines: {node: '>= 14'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + dependencies: + lilconfig: 3.1.2 + postcss: 8.4.38 + yaml: 2.4.5 + dev: true + /postcss@8.4.38: resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} engines: {node: ^10 || ^12 || >=14} @@ -1807,7 +1842,6 @@ packages: resolution: {integrity: sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==} engines: {node: '>= 14'} hasBin: true - dev: false /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} diff --git a/vite.config.ts b/vite.config.ts index e727372..38f5f5b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,8 +1,8 @@ import vike from "vike/plugin"; import react from "@vitejs/plugin-react-swc"; -import {vanillaExtractPlugin} from "@vanilla-extract/vite-plugin"; +import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin"; import { defineConfig } from "vite"; export default defineConfig({ - plugins: [react(), vike(), vanillaExtractPlugin()] + plugins: [react(), vike({ prerender: true }), vanillaExtractPlugin()], });