Open yannickschuchmann opened 1 month ago
For now I could add @medusajs/js-sdk
to the bundle in vite/astro config:
import { defineConfig } from "astro/config";
export default defineConfig({
vite: {
ssr: {
noExternal: ["@medusajs/js-sdk"],
},
},
});
This seems to do the trick as a workaround.
Bug report
Code(from v2 docs):
Error:
Describe the bug
I try to use
@medusajs/js-sdk
with astro. But just when I importMedusa
vite complains about the import. I was reading similar issues which got closed because things should be different with V2. Any ideas?System information
Medusa version (including plugins): 2.0.1 Node.js version: v20.16.0 Database: Postgres Operating system: MacOS Sonoma 14.6.1 Browser (if relevant): Arc
Steps to reproduce the behavior
Expected behavior
No import issue.
Code snippets