Skip to content

Commit

Permalink
docs: update remix usage
Browse files Browse the repository at this point in the history
  • Loading branch information
hemengke1997 committed May 29, 2024
1 parent 041020c commit e39572a
Showing 1 changed file with 40 additions and 5 deletions.
45 changes: 40 additions & 5 deletions packages/vite-plugin-istanbul-widget/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ export default defineConfig((env) => ({

[参考配置](../../playground/astro-app/astro.config.ts)

## Remix项目

### vite.config
[参考配置](../../playground/remix-app/vite.config.ts)

```ts
import react from '@astrojs/react'
import { defineConfig } from 'astro/config'
Expand Down Expand Up @@ -109,6 +104,46 @@ export default defineConfig({
})
```

## Remix项目

### vite.config
[参考配置](../../playground/remix-app/vite.config.ts)

```ts
import { vitePlugin as remix } from '@remix-run/dev'
import { defineConfig } from 'vite'
import { istanbulWidget } from 'vite-plugin-istanbul-widget/remix'

export default defineConfig({
plugins: [
remix(),
istanbulWidget({
enabled: true,
checkProd: false,
istanbulWidgetConfig: {
defaultPosition: {
x: 0,
y: 100,
},
plugin: {
report: {
async onReport(coverage, ...args) {
console.log(coverage, ...args)
},
},
setting: {
autoReport: false,
onLeavePage: true,
requireReporter: false,
},
},
},
fullReport: true,
}),
],
})
```

## 配置项

```ts
Expand Down

0 comments on commit e39572a

Please sign in to comment.