File 'virtual:/@storybook/builder-vite/vite-app.js' was not found in iframe.html
See original GitHub issueUsing Vue 2
Error in console:
My Vite config:
const { createVuePlugin } = require('vite-plugin-vue2')
const path = require('path')
const { visualizer } = require('rollup-plugin-visualizer')
module.exports = {
server: { middlewareMode: 'ssr' },
plugins: [createVuePlugin(), visualizer({
open: true
})],
resolve: {
alias: [
{
find: '@',
replacement: path.resolve(__dirname, 'src')
},
]
},
css: {
preprocessorOptions: {
scss: {
additionalData: `@import "@/assets/sass/global.scss";`
}
}
},
build: {
rollupOptions: {
output: {
entryFileNames: '[name].[hash].js'
}
}
}
}
My Storybook main.js
:
const viteConfig = require('../vite.config')
module.exports = {
stories: [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)",
],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-a11y",
],
core: { builder: "storybook-builder-vite" },
async viteFinal() {
return viteConfig
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
File 'virtual:/@storybook/builder-vite/vite-app.js' was not found ...
Using Vue 2 Error in console: My Vite config: const { createVuePlugin } = require('vite-plugin-vue2') const path = require('path') const ...
Read more >Iframe content not showing - html - Stack Overflow
I need to keep the onload javascript, because that is important for the functionality of the iframe. <iframe src="" class="prodframe pc" style= ...
Read more ><iframe>: The Inline Frame element - HTML - MDN Web Docs
The HTML element represents a nested browsing context, embedding another HTML page into the current one.
Read more >HTML iframe tag - W3Schools
The <iframe> tag specifies an inline frame. An inline frame is used to embed another document within the current HTML document.
Read more >The ultimate guide to iframes - LogRocket Blog
Developers mainly use the iframe tag to embed another HTML document within ... This means that the JavaScript inside the iframe will not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you want to reuse your project’s vite config, you should not just directly return it. Because it will override the configuration that
builder-vite
uses, which contains plugin handling virtual modulevite-app.js
. You can usemergeConfig
provided byvite
to merge configs, see https://github.com/eirslett/storybook-builder-vite/issues/85#issuecomment-900831050guys check this discussion for a workaround, it might be useful for you https://github.com/storybookjs/builder-vite/issues/367#issuecomment-1116892668