Skip to content

Config file doesn't work with .ts imports #330

@himat

Description

@himat

I tried to run npx slonik-typegen generate --config typegen.config.ts
but it failed with Error: Cannot use import statement outside a module

It seems like I can only use .js files for the config?

But I need to use a ts import because I want to load my db connection to pass for the poolConfig option.

typegen.config.ts

import * as dbConn from "./src/dbConnection";

...

So is this not possible to do?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions