Skip to content

Commit

Permalink
fix: Rename index.js to index.mjs
Browse files Browse the repository at this point in the history
This change is required to address the below error:

> This file is being treated as an ES module because it has a '.js' file
> extension and '/mnt/c/code/personal/discord-commits/dist/package.json'
> contains "type": "module". To treat it as a CommonJS script, rename it
> to use the '.cjs' file extension
  • Loading branch information
rcdailey committed Dec 25, 2023
1 parent 47c4e1c commit 3e087f6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ inputs:

runs:
using: node16
main: dist/index.js
main: dist/index.mjs
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "discord-commits",
"version": "1.0.0",
"description": "A github action that nicely displays multiple commits in discord based on templates.",
"main": "dist/index.js",
"main": "dist/index.mjs",
"type": "module",
"scripts": {
"build": "ncc build discord-commits/index.js --license licenses.txt",
"build": "ncc build discord-commits/index.mjs --license licenses.txt",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
Expand Down

0 comments on commit 3e087f6

Please sign in to comment.