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.
This commit is contained in:
Carsten Grohmann 2022-11-19 09:39:06 +01:00
parent d65a04454c
commit 50103374e7
3 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ BLACK_BIN = black
BLACK_OPTS = --verbose BLACK_OPTS = --verbose
ROLLUP_BIN = rollup ROLLUP_BIN = rollup
ROLLUP_OPTS = --config rollup.config.js ROLLUP_OPTS = --config rollup.config.mjs
TRANSCRYPT_BIN = transcrypt TRANSCRYPT_BIN = transcrypt
TRANSCRYPT_OPTS = --build --map --nomin --sform --esv 6 TRANSCRYPT_OPTS = --build --map --nomin --sform --esv 6

View File

@ -60,7 +60,7 @@ Both can be stored locally to use OOMAnalyser without an Internet connection.
``` ```
# . env/bin/activate # . env/bin/activate
# transcrypt --build --map --nomin -e 6 OOMAnalyser.py # transcrypt --build --map --nomin -e 6 OOMAnalyser.py
# rollup --config rollup.config.js # rollup --config rollup.config.mjs
or or