From d8560bdf1ce1d7a04a0e43e186b67549e002cade Mon Sep 17 00:00:00 2001 From: swiing Date: Fri, 12 May 2023 21:22:25 +0200 Subject: [PATCH] fix: rollup build command line otherwise pnpm run build returns error: " [!] 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. " --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1cef900..aea2647 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "main": "dist/index.js", "module": "dist/index.es.js", "scripts": { - "build": "rollup -c", + "build": "rollup -c --bundleConfigAsCjs", "lint": "pnpm lint:docs && pnpm lint:package && pnpm lint:js", "lint:docs": "prettier --write README.md", "lint:js": "eslint --cache src --ext .js",