Replies: 2 comments
-
|
I had same issue but found this as working // main.ts/js
viteFinal: async (config) => {
config.assetsInclude = [/\.md$/];
return mergeConfig(config, {
plugins: [react(), nxViteTsPaths()]
});
},and when importing the ex import { Markdown, Meta } from '@storybook/addon-docs/blocks';
import DocFile from "../../docs/contribution-flow.md?raw";
<Meta title="Components contribution" />
<Markdown>{DocFile}</Markdown> |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I have same issue, import react from '@vitejs/plugin-react';
import mdx from '@mdx-js/rollup';
export default defineConfig({
// ...
plugins: [react(), mdx()],
assetsInclude: ['**/*.mdx'],
});In my case I need to use MDX files both as react components and as static assets (via ?raw) It is possible to make it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I opdated to the latest vite version and when i start storybook i get this error now "Pre-transform error: Failed to parse source for import analysis because the content contains invalid JS syntax. You may need to install appropriate plugins to handle the .md file format, or if it's an asset, add "**/*.md" to
assetsIncludein your configuration."It was working before and i have assetsInclude: ["/*.md", "/*.mdx"] in my vite.config
Beta Was this translation helpful? Give feedback.
All reactions