Skip to content

Bug with rewriteSelectorsInFiles: true - Badly formatted content #261

@micisse

Description

@micisse

Describe the bug

Still in my exploration of stylify. I observed a bug related to "rewriteSelectorsInFiles: true" (See video for better understanding). Another observation is that at build time, the concerned file is also modified and badly formatted. The change in place of the selectors does not seem to work because of a comment like "// ts-ignore ..: <explanation>" or "// eslint-ignore // <explanation>" with chevron for example.

Enlarge the video to see it better

rewriteSelectorsInFiles-2.mp4

Without realizing it, with the activation of "rewriteSelectorsInFiles", several files have been impacted by the changes and the final build does not work because the files are modified in the wrong way. Luckily I make a copy of the original files first. These details (bugs) have an impact.

Reproduction

https://stackblitz.com/edit/remix-run-remix-fkre57?file=app%2Froutes%2F_index.tsx,stylify.js,package.json

Logs

No response

System Info

v0.6.0 / @stylify/bundler

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions