Closed as not planned
Description
Describe the bug
Vite is performing define replacements on the code in story source, which is a problem for a few reasons:
- The code that appears there should appear largely as-written by the developer, so environment variables should remain intact (probably?).
- It replaces with double-quotes, which breaks syntax since the whole source string is inside double quotes.
To Reproduce
See https://github.com/storybookjs/storybook/pull/19805#discussion_r1021023879
System
No response
Additional context
I've fixed this in the past with storybookjs/builder-vite#364. I wonder if this has started to break now with the change to story-source from a webpack loader to an unplugin.