Meteor-Community-Packages / meteor-postcss

PostCSS for Meteor

Home Page:https://packosphere.com/juliancwirko/postcss

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

from .scss to .css works. but no postprocessing

FinnFrotscher opened this issue · comments

everything works fine, except the styles are neither prefixed nor minified. what am i doing wrong?

I am running the latest meteor, with fourseven:scss

inside my client/main.js
import "/imports/styles/base";

package.json

"devDependencies": {
    "autoprefixer": "^6.5.1",
    "postcss-cssnext": "^2.11.0",
    "cssnext": "^1.8.4"
  },
  "postcss": {
    "plugins": {
      "postcss-cssnext": {
        "browsers": [
          "last 2 versions",
          "> 1%"
        ]
      }
    }

i also tried

"autoprefixer": {
  "browsers": [
    "last 2 versions",
    "> 1%"
  ]
}

Hi you need to configure that in package.json file not settings.json Take a look at the example here: https://github.com/juliancwirko/meteor-postcss-test/blob/master/package.json#L17

i do have the postcss inside the package.json. that was my typo.

Hmm, I'm sorry, hard to tell what could be wrong. Could you test it on this app? https://github.com/juliancwirko/meteor-postcss-test

the demo app is working, but i cant get it to work in my app. is it maybe the fourseven:scss?

also, in the demo app i cant add

"postcss-easy-import": {
        "prefix":"_",

the prefix is not being used and i have to add a _ to every import.

For imports it is better to use scss imports. But I don't know why it doesn't work for you. I use the package with scss and everything is ok. Do you have any errors in logs (on client or server)?

Anyway, Meteor and its build system isn't easy to extend :/ I hope it will change soon. I guess Meteor will be just build layer for the apps soon and then it should be better.

i am trying to get it to work with foundation-sites. it breaks on the mixins which are supposedly undefined
i will try and hack together my own css-build-plugin.

you want meteor to be based on webpack?

I think the best way would be to make it run only with scss and then add postcss to it.

...no It will probably never be based on Webpack, but in my opinion It would be great if it had very similar approach. Now when MDG has Apollo as their first product, Meteor could be just build tool for apps which could be simpler to configure than Webpack. We will see.

solved. i imported my main stylesheet into client/main.js not client/main.css for some reason. as soon as i did that all worked.