Rename file to .js

This commit is contained in:
Adria Navarro 2023-05-22 11:32:44 +02:00
parent 3d7af9b2a3
commit 2ce968fcfc
3 changed files with 9 additions and 5 deletions

View File

@ -16,8 +16,8 @@
"build": "cd ../.. && nx build @budibase/worker", "build": "cd ../.. && nx build @budibase/worker",
"check:types": "tsc -p tsconfig.build.json --noEmit", "check:types": "tsc -p tsconfig.build.json --noEmit",
"build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput",
"run:docker": "node dist/index.cjs", "run:docker": "node dist/index.js",
"debug": "yarn build && node --expose-gc --inspect=9223 dist/index.cjs", "debug": "yarn build && node --expose-gc --inspect=9223 dist/index.js",
"run:docker:cluster": "pm2-runtime start pm2.config.js", "run:docker:cluster": "pm2-runtime start pm2.config.js",
"predocker": "yarn build", "predocker": "yarn build",
"build:docker": "yarn predocker && docker build . -t worker-service --label version=$BUDIBASE_RELEASE_VERSION", "build:docker": "yarn predocker && docker build . -t worker-service --label version=$BUDIBASE_RELEASE_VERSION",

View File

@ -1,7 +1,7 @@
module.exports = { module.exports = {
apps: [ apps: [
{ {
script: "./dist/index.cjs", script: "./dist/index.js",
instances: "max", instances: "max",
exec_mode: "cluster", exec_mode: "cluster",
}, },

View File

@ -5,7 +5,6 @@
"build": { "build": {
"executor": "@nx/esbuild:esbuild", "executor": "@nx/esbuild:esbuild",
"outputs": ["{options.outputPath}"], "outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": { "options": {
"main": "packages/worker/src/index.ts", "main": "packages/worker/src/index.ts",
"outputPath": "packages/worker/dist", "outputPath": "packages/worker/dist",
@ -18,7 +17,12 @@
"output": "." "output": "."
} }
], ],
"format": ["cjs"] "format": ["cjs"],
"esbuildOptions": {
"outExtension": {
".js": ".js"
}
}
}, },
"configurations": { "configurations": {
"development": { "development": {