-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Vite ignoring external files during Pre-transform #15374
Comments
I think this might be related to the new server.warmup feature in vite 5 |
The upper-layer application of |
For the behavior of import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
assetsInclude: ['/sb-preview/runtime.js'],
// or
server: {
preTransformRequests: false
}
}) |
I just tested the |
this works for me too. thanks |
Neither have worked for me, the error goes away, the tree of components loads and the docs pages load. However each story on the docs page is empty and the individual story pages just show an infinite spinner. There are no console or network errors and I can see all the right files being requested (including the actual controls themselves). A the command line I do get an error of "Pre-transform error: No ESLint configuration found in D:\sb-preview." I'll try to put up a minimal repro |
I've bisected the Vite versions and have concluded this is introduced somehow with Vite https://github.com/vitejs/vite/blob/v5.0.8/packages/vite/CHANGELOG.md#508-2023-12-12 Nothing in that changelog stands out to me though. I can confirm that adding For reference, |
If anyone using Nuxt 3 ends up here, add this to your Nuxt config:
|
I have added Im using vite ^5.0.2 |
A workaround was landed on storybook side (storybookjs/storybook#25329). |
Describe the bug
Hi,
I've recently tried setting up storybook with the latest vite / vue template.
But it seems to be ignoring the build / rollupOptions / external setting during the pre-transform stage
Reproduction
As below
Steps to reproduce
This results in vue trying to pick up on
/sb-preview/runtime.js
Things do work so it's something that can be ignored, but it looks as if the Pre-transform stage is ignoring the config
Storybook normally merges this in, but I've also tried adding it manually
with
'./sb-preview/runtime.js'
and'/sb-preview/runtime.js'
but the same result
This might be related to
#11048
System Info
The text was updated successfully, but these errors were encountered: