New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@webxdc/vite-plugins

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webxdc/vite-plugins

Collection of vite plugins for webxdc development

  • 1.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17
increased by750%
Maintainers
0
Weekly downloads
 
Created
Source

Vite Plugins for Webxdc

npm package CI code style: prettier

Collection of Vite plugins and utilities for webxdc.

Features

  • 📱 Integrated webxdc.js mini-emulator to test your WebXDC right on the browser while developing.

  • 🐞 Integrated Eruda support to debug inside Delta Chat when building with NODE_ENV=debug.

  • 📦 Automatically generate your .xdc file.

  • 🦕 Support legacy/old browsers.

Getting Started

Scaffolding your first webxdc project:

npm create @webxdc/vite-plugins@latest

Then update your Vite configuration as needed. See below for example Vite configurations.

Example configurations

Example vite.config.js files

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,
  mockWebxdc,
  //  legacy, // might cause problems in existing projects
} from "@webxdc/vite-plugins";
import { defineConfig } from "vite";

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

For a full example check the example folder.

Troubleshooting

if you get this error when using vite:

✘ [ERROR] Failed to resolve "@webxdc/vite-plugins". This package is ESM only but it was tried to load by `require`.

to fix it you need to set in your package.json:

{
  ...
  "type": "module",
  ...
}

Keywords

FAQs

Package last updated on 23 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc