From 68842baa161c0389410dc682753a14d6cdaea23a Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Sat, 26 Nov 2022 15:05:42 -0800 Subject: [PATCH] NFC Move rollup.config.js to rollup.config.mjs (#3296) My local build fails with: ``` 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. Original error: Cannot use import statement outside a module ``` This fixes it. --- Makefile | 2 +- src/js/{rollup.config.js => rollup.config.mjs} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename src/js/{rollup.config.js => rollup.config.mjs} (100%) diff --git a/Makefile b/Makefile index 7c6b6f3eb..051c66a8f 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ node_modules/.installed : src/js/package.json src/js/package-lock.json touch node_modules/.installed dist/pyodide.js src/js/_pyodide.out.js: src/js/*.ts src/js/pyproxy.gen.ts src/js/error_handling.gen.ts node_modules/.installed - npx rollup -c src/js/rollup.config.js + npx rollup -c src/js/rollup.config.mjs dist/package.json : src/js/package.json cp $< $@ diff --git a/src/js/rollup.config.js b/src/js/rollup.config.mjs similarity index 100% rename from src/js/rollup.config.js rename to src/js/rollup.config.mjs