diff --git a/Dockerfile b/Dockerfile index 4041ed5..9d435de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:18-alpine -COPY dist/index.js /index.js +COPY dist/index.mjs /index.mjs RUN apk add --no-cache git -ENTRYPOINT [ "node", "/index.js" ] +ENTRYPOINT [ "node", "/index.mjs" ] diff --git a/dist/index.js b/dist/index.mjs similarity index 100% rename from dist/index.js rename to dist/index.mjs diff --git a/esbuild.config.js b/esbuild.config.js index a71d6fc..5649409 100644 --- a/esbuild.config.js +++ b/esbuild.config.js @@ -21,6 +21,7 @@ const options = { format: 'esm', outdir: 'dist', outbase: 'src', + outExtension: { '.js': '.mjs' }, }; esbuild.build(options).catch(err => { diff --git a/package.json b/package.json index d9a8ae5..e8490b1 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "eslint-remote-tester-run-action", "version": "0.0.1", "description": "GitHub Action for running eslint-remote-tester", - "main": "dist/index.js", + "main": "dist/index.mjs", "type": "module", "repository": "https://github.com/AriPerkkio/eslint-remote-tester-run-action", "homepage": "https://github.com/AriPerkkio/eslint-remote-tester-run-action",