diff --git a/package-lock.json b/package-lock.json index 2c773072..78e5c5a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "jest-watch-typeahead": "^2.2.2", "onchange": "^7.1.0", "prettier": "^3.3.3", - "rollup": "^2.79.1", + "rollup": "^3.29.5", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "^5.6.2", "watchify": "^4.0.0", @@ -15299,15 +15299,16 @@ } }, "node_modules/rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "version": "3.29.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz", + "integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==", "dev": true, "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=10.0.0" + "node": ">=14.18.0", + "npm": ">=8.0.0" }, "optionalDependencies": { "fsevents": "~2.3.2" diff --git a/package.json b/package.json index 0497b251..2cb72ad1 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "jest-watch-typeahead": "^2.2.2", "onchange": "^7.1.0", "prettier": "^3.3.3", - "rollup": "^2.79.1", + "rollup": "^3.29.5", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "^5.6.2", "watchify": "^4.0.0", diff --git a/rollup.config.js b/rollup.config.mjs similarity index 97% rename from rollup.config.js rename to rollup.config.mjs index 45651c34..e330a08b 100644 --- a/rollup.config.js +++ b/rollup.config.mjs @@ -1,12 +1,14 @@ /* eslint-disable no-console */ /* eslint-env node */ +import { createRequire } from 'node:module'; import babel from '@rollup/plugin-babel'; import resolve from '@rollup/plugin-node-resolve'; import commonjs from '@rollup/plugin-commonjs'; import terser from '@rollup/plugin-terser'; import sourceMaps from 'rollup-plugin-sourcemaps'; +const require = createRequire(import.meta.url); const pkg = require('./package.json'); // REQUIRED: process.env.BUILD_ENV: "esm" | "cjs" | "umd"