Is anyone importing ts enums from node_modules? I'...
# help
d
Is anyone importing ts enums from node_modules? I'm encountering a really weird issue. I can't tell if it's us or esbuild. i expect this import to get compiled away and never show up in the output js.
Copy code
import { LineItemStatus as TLineItemStatus } from "@canopyinc/api-docs/types/ts/EditLineItemInput.type";
but it remains as an unused variable artifact in the lambda file as
Copy code
var import_EditLineItemInput = __toModule(require("@canopyinc/api-docs/types/ts/EditLineItemInput.type"));
doing
import type {...}
solves it for other non-enum types, but we use enums as values.
Maybe this will help.
"importsNotUsedAsValues": "remove"