Skip to content

Commit 7197864

Browse files
committed
Upgrade rollup to 3 in standalone
1 parent b0c426f commit 7197864

File tree

4 files changed

+27
-24
lines changed

4 files changed

+27
-24
lines changed

standalone/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"author": "Josh Wilson <[email protected]>",
1515
"license": "MIT",
1616
"scripts": {
17-
"build": "rollup --config=rollup.config.js",
17+
"build": "rollup --config=rollup.config.mjs",
1818
"prepublishOnly": "cd .. && pnpm build && cd standalone && pnpm build && pnpm test",
1919
"test": "node --experimental-vm-modules ./test.mjs"
2020
},
@@ -28,7 +28,7 @@
2828
"eslint": "^8.57.0",
2929
"magic-string": "^0.30.8",
3030
"memoize-one": "^6.0.0",
31-
"rollup": "^2.79.1",
31+
"rollup": "^3.29.4",
3232
"semver": "^7.6.0",
3333
"typescript": "~5.3.3"
3434
},

standalone/pnpm-lock.yaml

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

standalone/rollup-plugin-replace.js renamed to standalone/rollup-plugin-replace.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import path from "path";
33
import Module from "module";
44
import { createFilter } from "@rollup/pluginutils";
55
import MagicString from "magic-string";
6+
import { createRequire } from "node:module";
7+
8+
const require = createRequire(import.meta.url);
69

710
function toAbsolute(id) {
811
return id.startsWith("./") ? path.resolve(id) : require.resolve(id);

standalone/rollup.config.js renamed to standalone/rollup.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import commonjs from "@rollup/plugin-commonjs";
33
import json from "@rollup/plugin-json";
44
import resolve from "@rollup/plugin-node-resolve";
55

6-
import replace from "./rollup-plugin-replace";
6+
import replace from "./rollup-plugin-replace.mjs";
77

8-
module.exports = {
8+
export default {
99
input: "index.js",
1010
output: {
1111
format: "module",

0 commit comments

Comments
 (0)