@simon-laux/webxdc-vite-plugins
v0.4.1
Published
Collection of [Vite](https://vitejs.dev/) plugins and utilities for [webxdc](https://webxdc.org/).
Downloads
162
Readme
@simon-laux/webxdc-vite-plugins
Collection of Vite plugins and utilities for webxdc.
Example project: https://github.com/webxdc/webxdc-vite
Getting Started
Setup a new Vite project using this template: https://github.com/webxdc/webxdc-vite
Alternatively, for an existing vite project add @simon-laux/webxdc-vite-plugins
:
npm install --save-dev @simon-laux/webxdc-vite-plugins
Then update your Vite configuration as needed. See below for example Vite configurations.
Example configurations
Example vite.config.js
files
Use all recommendations
Use webxdcViteConfig()
for a quick and easy default configuration.
// vite.config.ts
import { webxdcViteConfig } from "@simon-laux/webxdc-vite-plugins";
import { defineConfig } from "vite";
export default defineConfig(webxdcViteConfig());
Use plugins individually
Use the individual plugins for more control over the build.
// vite.config.ts
import {
buildXDC,
eruda,
// injectScript,
mockWebxdc,
// legacy, // might cause problems in existing projects
// webxdcScores,
} from "@simon-laux/webxdc-vite-plugins";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [buildXDC(), eruda(), mockWebxdc()],
});