Skip to content

Explicitly include a single dialect #452

Closed
@rogerfar

Description

@rogerfar

We are using this library in production in the browser, so bundle sizes matter.

When I analyze my bundle app, the sql-formatter library uses about 443kb, but a large part of this is all the dialetcs:

image

We only need 1 dialect, so there is no need for the others to be in the bundle.

Would it be possible to have an option to explicitly import a language so that the rest can be tree-shaken from the bundle?

I was thinking, maybe something like this:
import { format } from 'sql-formatter/sqlite';

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions