Updating build script to convert to .mjs for ESM support

This commit is contained in:
Jacob M-G Evans 2023-08-09 11:16:08 -05:00
parent d05a65f82b
commit e420d29d0a
No known key found for this signature in database
GPG key ID: 2A0C497CAB123094
2 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@ branding:
description: "Deploy your Cloudflare projects from GitHub using Wrangler" description: "Deploy your Cloudflare projects from GitHub using Wrangler"
runs: runs:
using: "node16" using: "node16"
main: "dist/index.js" main: "dist/index.mjs"
inputs: inputs:
apiToken: apiToken:
description: "Your Cloudflare API Token" description: "Your Cloudflare API Token"

View file

@ -21,9 +21,9 @@
"typescript" "typescript"
], ],
"type": "module", "type": "module",
"main": "dist/index.js", "main": "dist/index.mjs",
"scripts": { "scripts": {
"build": "npx ncc build ./src/index.ts", "build": "npx ncc build ./src/index.ts && mv ./dist/index.js ./dist/index.mjs",
"test": "vitest", "test": "vitest",
"format": "prettier --write . --ignore-path ./dist/**", "format": "prettier --write . --ignore-path ./dist/**",
"check": "prettier --check . --ignore-path ./dist/**" "check": "prettier --check . --ignore-path ./dist/**"