Local Community

How to set up : ViteJS + Local

Hi there :slight_smile:

I was wondering if someone succeeded to make ViteJS working with Local?

For now here is what I have:

import { defineConfig } from 'vite'

export default defineConfig({
   root: '../../../', // my vite.config.js is in my custom theme folder
   server: {
        host: 'mysite.local',
        open: true,
        proxy: {
          "/api": {
            target: "http://mysite.local",
            changeOrigin: true,
            secure: false,
            ws: true,
            rewrite: path => path.replace('/api', ''),
          },
        },
    },
})

Thanks in advance :slight_smile: