Skip to content

Commit

Permalink
fix(build): Fix assert failure in rollup
Browse files Browse the repository at this point in the history
Due to change in nodejs, as described here:

rollup/rollup#5531

Before this fix:
```
% npm run build

> [email protected] build
> rollup -c

[!] SyntaxError: Unexpected identifier 'assert'
    at compileSourceTextModule (node:internal/modules/esm/utils:338:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18)
    at ModuleLoader.#translate (node:internal/modules/esm/loader:437:12)
    at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:484:27)
    at ModuleJob._link (node:internal/modules/esm/module_job:115:19)

```
  • Loading branch information
pieper committed Dec 18, 2024
1 parent 33b738c commit 7f6d25b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import commonjs from "@rollup/plugin-commonjs";
// import babelRuntime from "@rollup/plugin-transform-runtime"
import json from "@rollup/plugin-json";
import replace from "@rollup/plugin-replace";
import pkg from "./package.json" assert { type: "json" };
import pkg from "./package.json" with { type: "json" };

export default {
input: "src/index.js",
Expand Down

0 comments on commit 7f6d25b

Please sign in to comment.