Skip to content

Commit

Permalink
fix: rollup build command line
Browse files Browse the repository at this point in the history
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.
"
  • Loading branch information
swiing committed May 12, 2023
1 parent 378b1c4 commit d8560bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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",
Expand Down

0 comments on commit d8560bd

Please sign in to comment.