このコミットが含まれているのは:
+14
-2
@@ -3,10 +3,22 @@ import react from '@vitejs/plugin-react'
|
||||
import path from 'path'
|
||||
import { defineConfig } from 'vite'
|
||||
|
||||
const mdxPlugin = mdx ({ providerImportSource: '@/mdx-components' })
|
||||
const originalTransform = mdxPlugin.transform
|
||||
|
||||
if (typeof originalTransform === 'function')
|
||||
{
|
||||
mdxPlugin.transform =
|
||||
function (code, id)
|
||||
{
|
||||
return (/[?&](raw|url)(?:&|$)/.test (id)
|
||||
? null
|
||||
: originalTransform.call (this, code, id))
|
||||
}
|
||||
}
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig ({
|
||||
plugins: [mdx ({ providerImportSource: '@/mdx-components' }), react ()],
|
||||
plugins: [mdxPlugin, react ()],
|
||||
resolve: { alias: { '@': path.resolve (__dirname, './src') } },
|
||||
server: { host: true,
|
||||
port: 5173,
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする