Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions clients/fidesui/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ const config: StorybookConfig = {
// Add dependencies to pre-optimization
plugins: [],
esbuild: { jsx: "automatic" },
// @chakra-ui/react@2.10.6 has an incomplete ESM distribution — several
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The comment references @chakra-ui/react@2.10.6, but package.json shows ^2.8.2 is installed. Update the version number in the comment to match the actual installed version or clarify if this refers to a specific problematic version range.

// internal .mjs files referenced by the package are missing from dist/esm/
// (e.g. toast.store.mjs, transition-utils.mjs, use-style-config.mjs).
// Forcing Vite to pre-bundle Chakra causes esbuild to use the complete CJS
// build and produce a single ESM bundle, bypassing the broken imports.
Comment on lines +25 to +29
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Excellent.
Found the github issue for this:
chakra-ui/chakra-ui#10650
Prob don't need to track since we are planning on removing anyways

optimizeDeps: {
include: ["@chakra-ui/react", "@chakra-ui/icons"],
},
});
},
};
Expand Down