Skip to content

Commit 96af2e7

Browse files
committed
fix: remove import assert for older node.js
1 parent 7aa4f62 commit 96af2e7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

rollup.config.js renamed to rollup.config.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ import commonjs from '@rollup/plugin-commonjs';
33
import {nodeResolve} from '@rollup/plugin-node-resolve';
44
import json from '@rollup/plugin-json';
55
import terser from '@rollup/plugin-terser';
6-
import pkg from './package.json' assert {type: 'json'};
6+
import { readFile } from 'fs/promises';
7+
const pkg = JSON.parse(
8+
await readFile(
9+
new URL('./package.json', import.meta.url)
10+
)
11+
);
712

813
let dependencies = '';
914

0 commit comments

Comments
 (0)