Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jinjiang/vlite

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jinjiang/vlite

Lite demo server, inspired by Vite

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

Vlite

A lite demo server, inspired by Vite.

Features

  • Zero-config
  • ESM-friendly
  • Straightforward compilations
  • Support Vue, React, and Vanilla
  • Support TypeScript, JSX, and TSX
  • Support CSS Modules and Scoped CSS
  • No node_modules installation required (package imports will be redirected to esm.sh)
  • No HMR, no SSR, no plugins, no bundling, no production

Installation

npm install -g @jinjiang/vlite
# or
yarn global add @jinjiang/vlite
# or
pnpm add -g @jinjiang/vlite

Getting Started

A quick Vue demo

echo "<div id=\"app\"></div><script type=\"module\" src=\"./main.ts\"></script>" > index.html
echo "import { createApp } from 'vue'\nimport App from './App.vue'\ncreateApp(App).mount('#app')" > main.ts
echo "<template><h1>Hello, Vlite\!</h1></template>" > App.vue
vlite

A quick React demo

echo "<div id=\"app\"></div><script type=\"module\" src=\"./main.tsx\"></script>" > index.html
echo "import React from 'react'\nimport ReactDOM from 'react-dom'\nReactDOM.render(<h1>Hello, World\!</h1>, document.getElementById('app'))" > main.tsx
vlite

Usage

vlite [<target-dir>] [--port <port>]
vlite [<target-dir>] --build
vlite [<target-dir>] --bundle
vlite --help
vlite --version

[!WARNING] To be noticed: the build and bundle commands are in experimental stage. For bundle mode, you have to add this script into your index.html:

<script>
  // TODO: Remove this line when define plugin is supported by Rolldown
  globalThis.process = { env: { NODE_ENV: 'development' } };
</script>

See the Vue example.

Examples

See the React example and the Vue example.

License

MIT

Keywords

FAQs

Package last updated on 22 Jul 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