mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
Update vite to v3
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import preact from '@preact/preset-vite'
|
||||
import alias from '@rollup/plugin-alias'
|
||||
import html from '@rollup/plugin-html'
|
||||
import glob from 'fast-glob'
|
||||
import fs from 'fs'
|
||||
@@ -30,18 +29,21 @@ const guides = glob.sync('src/guides/**/*.md').flatMap(g => {
|
||||
})
|
||||
|
||||
export default defineConfig({
|
||||
server: {
|
||||
port: 3000,
|
||||
},
|
||||
resolve: {
|
||||
alias: [
|
||||
{ find: 'react', replacement: 'preact/compat' },
|
||||
{ find: 'react-dom/test-utils', replacement: 'preact/test-utils' },
|
||||
{ find: 'react-dom', replacement: 'preact/compat' },
|
||||
{ find: 'react/jsx-runtime', replacement: 'preact/jsx-runtime' },
|
||||
],
|
||||
},
|
||||
build: {
|
||||
sourcemap: true,
|
||||
rollupOptions: {
|
||||
plugins: [
|
||||
alias({
|
||||
entries: [
|
||||
{ find: 'react', replacement: 'preact/compat' },
|
||||
{ find: 'react-dom/test-utils', replacement: 'preact/test-utils' },
|
||||
{ find: 'react-dom', replacement: 'preact/compat' },
|
||||
{ find: 'react/jsx-runtime', replacement: 'preact/jsx-runtime' },
|
||||
],
|
||||
}),
|
||||
html({
|
||||
fileName: '404.html',
|
||||
title: '404',
|
||||
|
||||
Reference in New Issue
Block a user