-
I'm asking since I see now that SolidJS has a jsx-runtime which is what I believe was missing. My setup: I'm using
My Vite setup: const config = async (): Promise<UserConfig> => {
const { default: mdx } = await import('@mdx-js/rollup')
return {
plugins: [solidPlugin(), WindiCSS(), tsconfigPaths(), mdx({ remarkPlugins: [] })],
optimizeDeps: {
include: ['solid-js/h/jsx-runtime'],
},
build: { minify: true, target: 'esnext', polyfillDynamicImport: false },
/** vitest */
test: { globals: true },
}
}
export default defineConfig(config) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
You are not configuring mdx at all. MDX does now know you are using Solid currently. You need to configure MDX. |
Beta Was this translation helpful? Give feedback.
-
Thanks to modderme123 on SolidJS Discord and @wooorm, got it working. Current setup: const config = async (): Promise<UserConfig> => {
const { default: mdx } = await import('@mdx-js/rollup')
return {
plugins: [
solid(),
WindiCSS(),
tsconfigPaths(),
mdx({
remarkPlugins: [],
jsxImportSource: 'solid-jsx',
providerImportSource: 'solid-mdx',
}),
],
server: { host: '0.0.0.0', port: 3000 },
resolve: {
alias: {
'@/': './src',
'~blog/': './data/blog',
},
},
optimizeDeps: {
include: ['solid-js/h/jsx-runtime'],
},
build: { minify: true, target: 'esnext', polyfillDynamicImport: false },
/** vitest */
test: { globals: true },
}
}
export default defineConfig(config) |
Beta Was this translation helpful? Give feedback.
Thanks to modderme123 on SolidJS Discord and @wooorm, got it working. Current setup: