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

vite-plugin-blocklet

Package Overview
Dependencies
Maintainers
0
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-blocklet

The Vite library plugin, which enhanced development of [ArcBlock blocklet](http://developer.blocklet.io/)

  • 0.9.22
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
355
increased by39.22%
Maintainers
0
Weekly downloads
 
Created
Source

vite-plugin-blocklet

The Vite library plugin, which enhanced development of ArcBlock blocklet

Use examples

Example of front-end project

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { createBlockletPlugin } from 'vite-plugin-blocklet';
import { nodePolyfills } from 'vite-plugin-node-polyfills';

// https://vitejs.dev/config/
export default defineConfig(async () => {
  return {
    plugins: [react(), createBlockletPlugin(), nodePolyfills({ protocolImports: true })],
  };
});

Example of back-end project

api/index.js

const express = require('express');
const app = express();

module.exports = { app };

api/dev.js

const { setupClient } = require('vite-plugin-blocklet');
const { app } = require('./index');

setupClient(app);

package.json

"start": "NODE_ENV=development nodemon api/dev.js -w api",

Basically, you vite.config.js file should be in the root of project folders, if you need setup a custom vite config file, you should change your npm scripts, like:

package.json

"start": "NODE_ENV=development nodemon api/dev.js -w api -- --config=./config/vite.config.js",

Or you can just pass vite config file path to setupClient function, like this:

const { setupClient } = require('vite-plugin-blocklet');
const { app } = require('./index');

setupClient(app, { configFile: './config/vite.config.js'});

FAQs

Package last updated on 24 Feb 2025

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