@culur/config-vite
v1.1.3
Published
Culur's vite configuration
Downloads
100
Readme
@culur/config-vite
✨ Features
The library is a shareable vite/vitest configuration. It has some key features as follows:
- Include
vite-tsconfig-paths
plugin by default. - Include
vitest
config by default (withtypecheck
,coverage
). - Customizable for more complex applications.
💿 Installation
Add @culur/config-vite
dependency to your project.
# Using npm
npm install @culur/config-vite --save-dev
# Using pnpm
pnpm install @culur/config-vite --dev
# Using yarn
yarn add @culur/config-vite --dev
Other packages:
- For
vite
usage, you need to installvite
package in devDependencies. - For
vitest
usage, you need to installvitest
,@vitest/ui
,@vitest/coverage-v8
packages in devDependencies. - For typecheck:
- Use
tsc
(fromtypescript
package) - Use
vue-tsc
(fromvue-tsc
package).
- Use
📖 Usage
1. Use default config
In vite.config.mts
:
import { vite } from '@culur/config-vite';
export default vite;
In vitest.config.mts
:
import { vitest } from '@culur/config-vite';
export default vitest;
2. Use custom config
In vite.config.ts
or vitest.config.mts
:
import { defineConfig } from '@culur/config-vite';
export default defineConfig({
test: true, // or false
// other configs...
});
📜 Scripts
Some commonly used scripts in package.json
.
{
"scripts": {
"test": "vitest run",
"test-tsc": "tsc --noEmit && vitest run",
"test-vue-tsc": "vue-tsc --noEmit && vitest run",
"test-ui": "vitest --ui"
}
}
🗃️ Changelog
See CHANGELOG for more information on what has changed recently.
🔒 License
See LICENSE for license rights and limitations (MIT).