Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add file detection for pretranspiled sass, less, scss files #11

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

deleonio
Copy link
Contributor

If we use Less, Scss or Sass, then there may not be a CSS file. Using the extension recognition, it is possible to touch the relevant style file that contains @windicss.

@antfu
Copy link
Member

antfu commented May 7, 2021

A bit confused, shouldn't this line get the current file path already?

context.entry = atRule.root().source?.input.from

@deleonio
Copy link
Contributor Author

deleonio commented May 9, 2021

Hi @antfu,
unfortunately not if you use a precompiler like SASS, LESS etc.

image

@antfu
Copy link
Member

antfu commented May 29, 2021

So how about we make an option to pass entry points manually for this scenario? Meaning

// postcss.config.js
module.exports = {
  plugins: {
    'postcss-windicss': {
      touch: [
        'a/b.postcss'
      ]
    },
  },
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants