Shopify / hydrogen

Hydrogen lets you build faster headless storefronts in less time, on Shopify.
https://hydrogen.shop
MIT License
1.27k stars 248 forks source link

Vanilla Extract - Failed to load resource: the server responded with a status of 504 (Outdated Optimize Dep) error #2266

Open grygielj opened 1 week ago

grygielj commented 1 week ago

What is the location of your example repository?

No response

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

2024.4.5

What version of Remix are you using?

2.9.2

Steps to Reproduce

  1. Create an empty project withnpm create @shopify/hydrogen@latest
  2. Install @vanilla-extract/css and @vanilla-extract/vite-plugin
  3. add vanilla extract plugin vite.config.ts
    plugins: [
    hydrogen(),
    oxygen(),
    remix({
      presets: [hydrogen.preset()],
      future: {
        v3_fetcherPersist: true,
        v3_relativeSplatPath: true,
        v3_throwAbortReason: true,
      },
    }),
    tsconfigPaths(),
    vanillaExtractPlugin(),
    ],
  4. Create any component with vanilla extract styles
  5. Failed to load resource: the server responded with a status of 504 (Outdated Optimize Dep) error image image

Expected Behavior

There shouldn't be an error and vanilla-extract should work

Actual Behavior

Console errors and vanilla-extract doesn't work

frandiox commented 1 week ago

Thanks for reporting. We are adding h2 setup css with vanilla-extract option in https://github.com/Shopify/hydrogen/pull/2245 and it was working there during development. Will double check again.

Also, can you try removing node_modules/.vite and try again?

grygielj commented 1 week ago

Thanks for reporting. We are adding h2 setup css with vanilla-extract option in #2245 and it was working there during development. Will double check again.

Also, can you try removing node_modules/.vite and try again?

Yes.