This template should help get you started developing a UI Library for QELOS.
VSCode + Volar (and disable Vetur).
TypeScript cannot handle type information for .vue
imports by default, so we replace the tsc
CLI with vue-tsc
for type checking. In editors, we need Volar to make the TypeScript language service aware of .vue
types.
See Vite Configuration Reference.
npm install
npm run dev
npm run build
The build process includes a step that modifies the dist/play-manifest.json
file by replacing placeholder variables with actual values. This allows for dynamic configuration of the library when deployed in different environments.
PACKAGE_NAME
: The name of the package (defaults to the name in package.json)PUBLIC_URL
: The base URL where the library assets are hosted (defaults to 'https://ui-lib.qelos.io')
# Build with custom environment variables
PACKAGE_NAME="my-custom-lib" PUBLIC_URL="https://cdn.example.com/assets" npm run build
During the build process, the script automatically:
- Builds the library using Vite
- Runs a post-build script that reads the
dist/play-manifest.json
file - Replaces all occurrences of
{{PACKAGE_NAME}}
and{{PUBLIC_URL}}
with their respective values - Saves the modified manifest back to the dist folder