Skip to content

webxdc/webxdc-vite-plugins

Repository files navigation

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 webxdc-vite-plugins:

npm install --save-dev 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 "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 "webxdc-vite-plugins";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [buildXDC(), eruda(), mockWebxdc()],
});

About

Collection of vite plugins and utilities for webxdc

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published