Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ZhongxuYang/vitepress-plugin-nprogress

nprogress plugin for vitepress
https://github.com/ZhongxuYang/vitepress-plugin-nprogress

nprogress vitepress-plugin

Last synced: about 2 months ago
JSON representation

nprogress plugin for vitepress

Awesome Lists containing this project

README

        

# vitepress-plugin-nprogress

> Nprogress plugin for Vitepress


Downloads
Version
License

## Install
```sh
yarn add -D vitepress-plugin-nprogress
# OR npm install -D vitepress-plugin-nprogress
```

## Usage
```ts
// .vitepress/theme/index.ts

import DefaultTheme from "vitepress/theme"

import vitepressNprogress from 'vitepress-plugin-nprogress'
import 'vitepress-plugin-nprogress/lib/css/index.css'

export default {
...DefaultTheme,
enhanceApp: (ctx) => {
vitepressNprogress(ctx)
}
}
```

## Tips
If got `TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".css" for ***/node_modules/nprogress/nprogress.css` error when you build,

you can config like this in your `vite.config.ts`:
```ts
// vite.config.ts
import {defineConfig} from 'vite'

export default defineConfig({
ssr: {
noExternal: ['vitepress-plugin-nprogress']
},
})
```

Then you can use `nprogress` ! 🎉