Visitar URL original
Lazy Input.css · Issue #1945 · postcss/postcss · GitHub
Skip to content

Lazy Input.css #1945

Description

@nex3

I'm looking into sass/dart-sass#88, with the goal of exposing a PostCSS-compatible AST API (at least for statement-level AST nodes). One issue I'm running into is that Sass doesn't directly store the CSS text of the files it parses as a string. This means that creating a new Input object is relatively expensive, because we need to reconstruct the CSS file's text, even if the user is only ever accessing node.source.input.from as is reasonably common. It would be nice to have a way to make the css argument to new Input() be able to be lazy and only accessed when it's necessary.

Activity

  1. ai commented on Jun 18, 2024

    @ai
    Member

    Sound interesting. Can you send PR to see the possible implementation for further discussions (can be without tests for the beginning)?

  2. nex3 commented on Jun 18, 2024

    @nex3
    ContributorAuthor

    I'll see if I can find the time in a couple weeks... but most of my time is going to be taken up just working on getting this working at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions