egardner / sd-components

Structured Data Components

Home Page:https://sd-components.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SD-Components

This is a simple example of how to use Vite to build a component library without introducing a lot of extra junk. This example is adapted from this example in the Vite playground repo.

Installation

npm install

Usage

# Run the dev server
npm run dev
# Generate output
npm run build

This example takes advantage of Vite's "library mode" feature: https://vitejs.dev/guide/build.html#library-mode. As configured, this project can do the following:

  • vue dependency is externalized, not included in the build (and handled as a window.Vue global for the UMD build).
  • Single-file Components are pre-compiled into render functions
  • LESS imports are processed and resulting CSS is exported into a separate .css file
  • Builds the component library in both ES Module and UMD versions; the latter supports CommonsJS, AMD, and IIFE usage.

About

Structured Data Components

https://sd-components.netlify.app/


Languages

Language:Vue 73.7%Language:Less 15.9%Language:JavaScript 8.2%Language:HTML 2.2%