From 50103374e7747a4a4847b3e7425cc8d84466479b Mon Sep 17 00:00:00 2001 From: Carsten Grohmann Date: Sat, 19 Nov 2022 09:39:06 +0100 Subject: [PATCH] Fix Node.js warning about wrong module type # rollup --config rollup.config.js (node:2833) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (Use `node --trace-warnings ...` to show where the warning was created) [!] RollupError: Node tried to load your configuration file as CommonJS even though it is likely an ES module. To resolve this, change the extension of your configuration to ".mjs", set "type": "module" in your package.json file or pass the "--bundleConfigAsCjs" flag. --- Makefile | 2 +- README.md | 2 +- rollup.config.js => rollup.config.mjs | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename rollup.config.js => rollup.config.mjs (100%) diff --git a/Makefile b/Makefile index ada925b..5e70dd0 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ BLACK_BIN = black BLACK_OPTS = --verbose ROLLUP_BIN = rollup -ROLLUP_OPTS = --config rollup.config.js +ROLLUP_OPTS = --config rollup.config.mjs TRANSCRYPT_BIN = transcrypt TRANSCRYPT_OPTS = --build --map --nomin --sform --esv 6 diff --git a/README.md b/README.md index 45c8822..cd3f7dd 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Both can be stored locally to use OOMAnalyser without an Internet connection. ``` # . env/bin/activate # transcrypt --build --map --nomin -e 6 OOMAnalyser.py -# rollup --config rollup.config.js +# rollup --config rollup.config.mjs or diff --git a/rollup.config.js b/rollup.config.mjs similarity index 100% rename from rollup.config.js rename to rollup.config.mjs