A rollup plugin allowing you to import PEG.js grammars as parsers directly in your code.
import { parse } from "grammar.pegjs";
console.log(parse("language to parse"));
npm install --save-dev rollup-plugin-pegjs
import { rollup } from "rollup";
import pegjs from "rollup-plugin-pegjs";
rollup({
entry: "main.js",
plugins: [
pegjs()
]
});