Comments (10)
I am getting a ton of warnings from autoprefixer because one of my vendor dependencies uses an outdated syntax for gradients. It would be really really great to have this feature so I can get rid of all this noise.
from ember-cli-postcss.
@raemadeline thanks for reporting this! I'd like to implement this soon. Do you mind sharing your postcss config and an example of the warning output? I think it would help for testing this feature.
As a short term fix, are you using postcss-reporter as one of your plugins? I'm curious if passing { plugins: ['!autoprefixer'] }
as part of the options object would silence the warnings by blacklisting reporting for autoprefixer. I don't think this is a long term solution as you'd want that logging for parsing other dependencies or files, but it might help with all the console noise in the short term.
from ember-cli-postcss.
Sure. Here's my postcss config
postcssOptions: {
compile: {
enabled: false
},
filter: {
enabled: true,
plugins: [
{
module: autoprefixer,
options: {
browsers: ['last 2 version', 'Safari >= 8']
}
}
]
}
},
And the warnings basically look like this:
autoprefixer: /Users/raemadeline/project/assets/vendor.css:44:5: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.
But with many occurrences (a lot of noise) due to a lot of my dependencies using this outdated syntax.
I am not using postcss-reporter but it looks useful and I think I will add it to my setup. I would rather not silence the autoprefixer warnings in case there is a warning for code in my app (as opposed to 3rd party libraries), hence why I want to filter out my vendor dependencies
from ember-cli-postcss.
@raemadeline thanks for supplying the config and an example warning. I don't think my suggestion is a great fix, just that it might help until this feature is implemented.
Do you mind providing the name of the vendor dependency you're using so I can test against it? Thanks.
from ember-cli-postcss.
@jeffjewiss the vendor dependency thats causing this error is CKEditor
from ember-cli-postcss.
Thanks. I wasn't able to replicate the gradient warnings locally, but that could be due to how I'm including CKEditor or differing theme files.
I think I have filtering vendor dependencies working, but don't have a great project to test it on. Do you mind testing it out on your project?
You would need to run npm install --save-dev jeffjewiss/broccoli-postcss#filter-vendor-deps
and then update the options for filter to have the exclude property:
filter: {
enabled: true,
exclude: ['ckeditor/**/*'],
...
from ember-cli-postcss.
Wait this is for ember-cli-postcss
, how would installing the broccoli-postcss
package help?
from ember-cli-postcss.
Sorry for the delay on this.
I was originally thinking that installing broccoli-postcss
in your project would override the dependency in ember-cli-postcss
, but I'm not confident that's the case.
I've pushed a branch to ember-cli-postcss
instead, so you can run: npm install --save-dev jeffjewiss/ember-cli-postcss#filter-vendor-deps
and update the options mentioned above.
Thanks for helping me debug and test this issue.
from ember-cli-postcss.
Hey @raemadeline, just wondering if you'll have a chance to take a look at this. Thanks!
from ember-cli-postcss.
It's now possible to white-list/black-list the files that are processed by the filter
method by using the include
and exclude
options. An example is outlined in the readme.
from ember-cli-postcss.
Related Issues (20)
- Embroider and postcss-import can't find file in node_modules? HOT 1
- Does not work with postcss 8 HOT 4
- apps, addons, and tailwind specificity HOT 3
- Infinite loop with postcss-color-hex-alpha HOT 2
- Embroider compatibility issue (filter) HOT 2
- Cannot use SCSS in version 7 HOT 10
- How do you run css compilation when templates are updated? HOT 23
- Ember canary error - Uncaught ReferenceError: Ember is not defined HOT 3
- Vulnerability in merge package before 2.1.1 HOT 1
- Deprecation warnings with Ember 3.27 HOT 14
- Addon using @tailwindcss/jit: ENOENT: no such file or directory, stat 'assets/vendor.css' HOT 1
- `yarn outdated` is Confusing HOT 2
- Cannot use `cssnano` in version 7 HOT 6
- ember-cli-postcss v7.1.0 has a breaking change as it's requires Node.js 14 now HOT 5
- ChainAlert: npm package release (7.2.0) has no matching tag in this repo
- Node 12 dropped too early? HOT 1
- Filter deprecation warnings HOT 1
- How do I add postcss-nested to configuration? HOT 1
- [Bug]: Conflicting with ember-cli-sass HOT 2
- how to apply a specific postcss plugin to only a specific set of files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-postcss.