rollup.config.js 397 B

1234567891011121314151617
  1. import typescript from "@rollup/plugin-typescript"
  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: [
  11. lezer(),
  12. typescript({
  13. tsconfig: "./tsconfig.json"
  14. })
  15. ],
  16. }