0

Ok, weirdest thing. I'm using the following pattern to create copies of objects without certain parameters. I'm actually not even sure what to call this pattern or how to google it, but here's an example: let newVar = (({ foo, bar, ...o }) => o)(oldVar) so newVar doesn't have the properties foo or bar. I got the pattern from here.

Works fine on my local, but when I deploy to production, it doesn't trim the properties.

Heroku, Node 15.8
tsconfig:

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es2019",
    "module": "es2020",
    "lib": [
      "es2019",
      "dom",
      "ESNext.String",
    ]
  }
}

The process is being done in a webworker:

/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "outDir": "./out-tsc/worker",
    "lib": [
      "es2019",
      "webworker"
    ],
    "types": []
  },
  "include": [
    "src/**/*.worker.ts"
  ]
}

I changed my webWorker to ESNext but still no luck. Wondering why it would work on my local (also works on my dev server on heroku; just not in production mode)

jugglervr
  • 143
  • 7

0 Answers0