Comments (2)
Yes, I appear to have the same problem when I try to use a dependency that uses process.env
. For example, when a dependency uses the util
-package then it complains about https://github.com/browserify/node-util/blob/master/util.js#L109
When you have vite.config.ts
-file like below it still fails, feels like it doesn't get used by Storybook v8:
/// <reference types="vitest" />
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
export default defineConfig({
define: {
"process.env": process.env,
},
plugins: [react()],
css: { postcss: { plugins: [] } },
test: {
environment: "jsdom",
setupFiles: ["setupTests.ts"],
restoreMocks: true,
coverage: {
provider: "v8",
all: true,
},
},
});
from storybook.
Hi, thanks for reporting this. do you have a reproduction repo you can share? If not, can you please create one via storybook.new? We prioritize bug reports that have reproduction. Thank you! 🙏
from storybook.
Related Issues (20)
- Blog Post: Highlight the feature
- [Bug]: Addon build fails due to missing @storybook/manager/globals on 8.2.5 HOT 3
- [Bug]: Upgrade still prompts for all automigrations HOT 1
- [Bug]: Incorrect null type error for ControlType HOT 3
- UI: solidify story status elements HOT 1
- UI: Rework footer filtering component and API HOT 1
- Remove/deprecate experimental bottomBar APIs in Storybook core [gert] HOT 1
- Move bottom bar button (filter) logic from VTA to Storybook [gert] HOT 2
- Migration strategy with different versions of Storybook+VTA (so that there is only filter UI)
- Rework file transformation logic [yann] HOT 2
- Use internal Storybook renderer logic for portable stories in 8.3 (as a default), as it will solve hard to debug race conditions and allows us to run the vitest test runner for all renderers [kasper]
- Portable stories: Refactor Storybook preview and Portable stories to reuse logic [kasper]
- Scaffold `@storybook/addon-vitest` with basic mocked test results [gert] HOT 1
- Server/browser state for status API from JUnit report [yann, gert] HOT 1
- [Bug]: Absolute import from MDX does not work HOT 2
- [Bug]: PNPM Install returning errors HOT 4
- [Bug]: Failed to build the preview SB_BUILDER-WEBPACK5_0002 (WebpackInvocationError): Module not found: Error: Can't resolve './Typography' in './components/Typography' HOT 1
- [Bug]: PanelPosition on mobile Viewports not working / is alway bottom HOT 2
- [Bug]: Storybook Angular not setting required Inputs() correctly HOT 1
- Add Storybook Vitest plugin to Vite based (internal) sandboxes in the monorepo HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storybook.