Skip to content

Example repo showing the use of modular-scripts and vite / vitest

Notifications You must be signed in to change notification settings

steveukx/modular-vite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

modular-vite

modular-scripts task runner

To automate many monorepo tasks this uses modular-scripts:

# add a new package to the monorepo
yarn modular add

# start an app/view with local webpack dev server
yarn modular start PKGNAME

vitest as unit test framework

Configured to use vite as the builder for unit tests run through vitest. Using the explicit import style instead of implicit globals for ease of consuming the tests standalone:

import { describe, expect, it } from 'vitest';

Run from the root of the project as:

yarn vitest

vite is not the builder

The build is managed by modular-scripts which currently uses webpack or esbuild, so vite is not a build tool used for the application as a whole, remaining only an aide to development.

yarn version

Use of a consistent version of yarn achieved with the packageManager setting in package.json along with a cached copy of yarn itself in the .yarn/releases folder.

Update to the latest yarn by running:

yarn set version latest --yarn-path
git add package.json .yarn/releases

About

Example repo showing the use of modular-scripts and vite / vitest

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published