Skip to content

Top level import of Node and util libraries #6060

@ryands17

Description

@ryands17

I want to import Node's filesystem libraries and other utils I have. Currently SST gives the following error for top-level imports.

Your sst.config.ts has top level imports - this is not allowed

I understand this makes sense for stacks, but can we import Node built-in modules like fs and other third-party library utils at the top-level?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions