-
-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MillionLint seems to break storybook, at least with redwoodjs #1163
Comments
Thanks for opening this issue! A maintainer will review it soon. |
I have same issue. Even after disabling it in the Vite config, the error still occurs. MillionLint.vite({
enabled: false,
}), |
I had same issue and solve with this cursed code export default defineConfig(async ({ mode }) => {
const millionLintPlugin = await (async () => {
const isStorybook = process.env.npm_lifecycle_event === "storybook";
if (isStorybook) {
return [];
}
// This needs to be wrapped because, for some reason, if it gets called anywhere in the root scope,
// storybook breaks again... (I don't know why)
const initMillionLint = async () => {
const MillionLint = await import("@million/lint");
return [
MillionLint.vite({
enabled: mode === "development",
}),
];
};
return initMillionLint();
})();
return {
plugins: [
...millionLintPlugin,
react(),
...
]
};
} This code looks bit messy, but it seems that load millionLint at anytime causes an error. So, I had to isolate it… |
Workarounds are mitigating the issue but not solving it. |
What version of
million
are you using?1.0.14
Are you using an SSR adapter? If so, which one?
none
What package manager are you using?
yarn
What operating system are you using?
Linux
What browser are you using?
Chrome
Describe the Bug
This may be too specific to worry about, but I just spent a bunch of time debugging why my storybook was no longer running, and it turned out that the culprit was including
@milllion/lint
in my vite config. I didn't even have it in my plugins list, just importing the library was enough to make it fail.The specific issue was that the storybook page was 404-ing trying to load http://localhost:7910/sb-addons/essentials-toolbars-4/manager-bundle.js - in fact, the storybook dev process wasn't even creating he web/node_modules/.cache/storybook/public/ directory at all.
I'll attach a log from running
DEBUG=* yarn rw storybook &> debug.txt
debug.txt
You can probably reproduce with a fresh redwood installation, enabling miilion in the vite config, and running
yarn rw storybook
What's the expected result?
I didn't expect enabling
@million/lint
in my vite config to affect my ability to run storybook.Link to Minimal Reproducible Example
See above
Participation
The text was updated successfully, but these errors were encountered: