Skip to content

geekr-dev/go-vite-plugin

 
 

Repository files navigation

Go Vite Plugin

Introduction

Vite is a modern frontend build tool that provides an extremely fast development environment and bundles your code for production.

This plugin configures Vite for use with a Go backend server.

Usage

install:

npm i go-vite-plugin

config in the vite.config.js:

import { defineConfig } from 'vite';
import go from 'go-vite-plugin';
import vue from '@vitejs/plugin-vue';

export default defineConfig({
    plugins: [
        go({
            input: 'resources/js/app.js',  // js source code entry point
            refresh: true,
        }),
        vue({
            template: {
                transformAssetUrls: {
                    base: null,
                    includeAbsolute: false,
                },
            },
        }),
    ]
});

when you run npm run dev, then you can visit http://localhost:5173 in your browser:

go-vite-plugin

License

The Go Vite plugin is open-sourced software licensed under the MIT license.

About

Go plugin for Vite

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 63.1%
  • TypeScript 35.7%
  • JavaScript 1.2%