Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changeset/thirty-moons-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

Internal change. Improve node version compatibility in the build script.
12 changes: 11 additions & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ import replace from "rollup-plugin-replace";
import typescriptPlugin from "rollup-plugin-typescript2";
import typescript from "typescript";
import json from "@rollup/plugin-json";
import pkg from "./package.json" assert { type: "json" };
import * as fs from "node:fs";
import * as path from "node:path";
import { fileURLToPath } from "node:url";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

// Once we drop support for Node versions <22 we can replace this line with
// just:
// import pkg from './package.json' with {type: 'json'};
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, "package.json")));

const es2017BuildPlugins = [
typescriptPlugin({
Expand Down
Loading