Skip to content

Commit

Permalink
output is a module
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Oct 12, 2024
1 parent 9f5e3b9 commit 85ba00e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ outputs:

runs:
using: 'node20'
main: 'dist/action.js'
main: 'dist/action.mjs'
19 changes: 10 additions & 9 deletions build-release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import esbuild from 'esbuild';
import { esbuildPeggyPlugin } from './src/peggy-compile.mjs';

const config = {
entryPoints: ['src/action.mjs'],
format: 'esm',
outdir: 'dist',
bundle: true,
platform: 'node',
target: ['node20'],
dropLabels: ['NOCOMPILE'],
minify: true,
plugins: [
entryPoints: ['src/action.mjs'],
format: 'esm',
outdir: 'dist',
outExtension: { '.js': '.mjs' },
bundle: true,
platform: 'node',
target: ['node20'],
dropLabels: ['NOCOMPILE'],
minify: true,
plugins: [
esbuildPeggyPlugin(),
],
};
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.2.1",
"description": "Get prereqs for local dist",
"main": "src/get-prereqs.mjs",
"type": "module",
"scripts": {
"lint": "eslint",
"lint:fix": "eslint --fix",
Expand Down

0 comments on commit 85ba00e

Please sign in to comment.