rollup.config.js 335 B

123456789101112
  1. import typescript from "rollup-plugin-ts"
  2. import { lezer } from "@lezer/generator/rollup"
  3. export default {
  4. input: "src/index.js",
  5. external: (id) => id != "tslib" && !/^(\.?\/|\w:)/.test(id),
  6. output: [
  7. { file: "dist/index.cjs", format: "cjs" },
  8. { dir: "./dist", format: "es" },
  9. ],
  10. plugins: [lezer(), typescript()],
  11. }