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

https://github.com/cgqaq/rollup-plugin-dbg

Rust dbg! in js powered by rollup/vite plugin system
https://github.com/cgqaq/rollup-plugin-dbg

debug rollup-plugin vite-plugin

Last synced: 10 months ago
JSON representation

Rust dbg! in js powered by rollup/vite plugin system

Awesome Lists containing this project

README

          

# rollup-plugin-dbg

## This plugin is also compatible with vite

### use with rollup

```js
import { defineConfig } from "rollup";
import config from "./package.json";
import PluginDbg from "rollup-plugin-dbg";

export default defineConfig({
plugins: [PluginDbg({ projectRoot: __dirname })],
input: "./index.js",
output: [
{
file: config.exports["."].import,
format: "es",
},
{
file: config.exports["."].require,
format: "commonjs",
exports: "auto",
},
],
});
```

### use with vite

```js
import { defineConfig } from "vite";
import PluginDbg from "rollup-plugin-dbg";

export default defineConfig({
mode: "development",
plugins: [PluginDbg()], // do not need projectRoot when using with vite
build: {
outDir: "dist",
lib: {
entry: "index.js",
name: "example",
},
},
});
```