Daydreamer-riri / vite-react-ssg

Static-site generation for React on Vite.
https://vite-react-ssg.netlify.app/
MIT License
125 stars 6 forks source link

Unable to recognize the base of Vite #5

Closed condorheroblog closed 11 months ago

condorheroblog commented 11 months ago
# vite.config.ts
export default defineConfig({
    base: "/vite-plugin-fake-server/",
    plugins: [
        react(),
    ],
});
# package.json

# Previously
"dev": "vite",

# Now
"dev": "vite-react-ssg dev",

The behavior of vite-react-ssg dev and vite is different, vite-react-ssg dev cannot recognize the path specified by base.

In addition, https://github.com/antfu/vite-ssg only replaces the build command

Daydreamer-riri commented 11 months ago

Hi @condorheroblog , now, vite-react-ssg supports base.

You can check the example here: https://github.com/Daydreamer-riri/vite-react-ssg/blob/main/examples/lazy-pages/vite.config.ts

If you encounter any problems, please let me know.