-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Ability to pass dependency when styles are being processed #417
Comments
@limitlessloop can you provide minimum reproducible test repo to ensure all logic will implement? |
Yeah I'll try my best. I'll put one together now. |
@evilebottnawi I've uploaded an example the best I can at https://github.com/limitlessloop/vuepress-postcss-example VuePress has a config file
|
There are two way to add dependencies:
result.messages.push({ type: 'dependency', file: '/path/to/file.ext' })
require('postcss-plugin')({ addDependecy: this.webpack.addDependency }); In both cases you need to do some work on a plugin side |
We should document it |
Proposal
Allow dependencies to be set, so the styles being processed have access to things like global variables, class names, mixins etc.
Use Case
I’m using VuePress with PostCSS which uses
postcss-loader
. I want to avoid having to@import
the same file in each of my components when using libraries like TailwindCSS. I've had the same use case with other frameworks. I can't find the documentation but I've heard this being known as a dependency inside a webpack loader.Implementation
The text was updated successfully, but these errors were encountered: