gajus / babel-plugin-react-css-modules

Transforms styleName to className using compile time CSS module resolution.
Other
2.05k stars 162 forks source link

Cannot configure postcss-import plugin? #136

Open vladimirvolek opened 6 years ago

vladimirvolek commented 6 years ago

Is there any way to configure postcss-import plugin?

Something like

"plugins": [
    "postcss-import", {
        "path": ["path1", "path2"]
    },
    "postcss-each",
    "postcss-cssnext"
]

I can see the error that it should be string.

[ { keyword: 'type',
    dataPath: '.filetypes[\'.css\'].plugins[0]',
    schemaPath: '#/properties/filetypes/patternProperties/%5C..*/properties/plugins/items/type',
    params: { type: 'string' },
    message: 'should be string' } ]
niksajanjic commented 6 years ago

You need to put it in array:

"plugins": [
    ["postcss-import", {
        "path": ["path1", "path2"]
    }],
    "postcss-each",
    "postcss-cssnext"
]

But postcss-import doesn't work for me, not sure why. I see there's an issue saying that postcss-easy-import won't work and that plugin uses this under the hood. So I guess that is connected.