Comments (13)
@htanjo Which plugins need this option?
from gulp-postcss.
In my project, postcss-copy-assets requires it.
And I tried postcss-copy previously, it also depends on to
option.
from gulp-postcss.
@htanjo sorry for the delay, I'm extremely busy this week, will be able to check it over the Weekend.
from gulp-postcss.
@w0rm That's ok! Thanks.
from gulp-postcss.
@htanjo I sent you a temporary fix that should work.
Sourcemaps are really complicated in gulp. The source map from the previous operation has to be combined with the sourcemap from the next operation. This only works when file
from the previous map matches element from sources
of the current map.
This is what was happening when the to='dist/main.css'
option was set:
previousMap = {sources: [ 'main.scss' ], file: 'main.css'}
currentMap = {sources: [ '../src/main.css' ], file: 'main.css'}
Because main.css
and ../src/main.css
do not match, only the currentMap
was output.
The additional complication comes from the base
option of the gulp file, gulp source maps work relatively to the base
directory, but postcss doesn't have this separation.
from gulp-postcss.
It seems that I can only properly fix this issue after this is implemented in postcss: postcss/postcss#240
from gulp-postcss.
@w0rm I see...! I understood the situation.
Your workaround is very helpful and I'll use it at the moment.
Thanks!
from gulp-postcss.
I get the same issue regardless of the to
option. In fact, even if I run postcss with an empty processor list and no options I have this problem. The issue is also affecting plugins which rely on postcss, such as gulp-autoprefixer.
from gulp-postcss.
@alvint hi, if it happens regardless of the to
option then it's not related to this issue. Please open a separate issue and add a link to a minimal project that reproduces it. This way I will be able to help you.
Sometimes gulp-postcss is not even an issue. A previous gulp plugin may generate a wrong source map that cannot be merged, so I really need to see the code to figure out what went wrong!
from gulp-postcss.
Some issue, I try to understand in detail what the problem is
from gulp-postcss.
Any updates on that?
from gulp-postcss.
@timkraut nope and postcss/postcss#240 wasn't implemented.
from gulp-postcss.
Closing as wontfix because postcss/postcss#240 is closed.
from gulp-postcss.
Related Issues (20)
- Error in plugin "gulp-postcss" HOT 1
- PostCSS 8 support HOT 9
- Extension css for output HOT 2
- PostCSS plugin autoprefixer requires PostCSS 8. Update PostCSS or downgrade this plugin HOT 6
- Use postcss-load-config 3.0
- Error: [object Object] is not a PostCSS plugin HOT 1
- CSS Syntax Error, alien script, and ELIFECYCLE error on build HOT 9
- Sourcemaps always shows parent line for nested SASS HOT 1
- Support "watch" mode (equivalent to -w switch in postcss-cli) HOT 6
- PostCSS dependency messages are not respected HOT 2
- Error: PostCSS plugin autoprefixer requires PostCSS 8. HOT 3
- Outputing multi-level folders HOT 1
- Error plugin is not a function HOT 2
- Not working with TailwindCSS >=3.0 HOT 1
- CssSyntaxError in plugin "gulp-postcss" / You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser HOT 1
- TypeError in plugin "gulp-postcss" plugin is not a function HOT 1
- ENOENT: No such file or directory (sass/postcss/tailwind)
- s.default.isPseudoElement is not a function HOT 1
- Update `postcss-load-config` HOT 1
- Why does the new version 9.1.0 not comply with semver about engines.node? HOT 6
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 gulp-postcss.