Skip to content

Commit

Permalink
Fixed issue with postcss config
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinmcfarland committed Jan 18, 2021
1 parent 88f44ff commit 3a19f43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import fs from 'fs-extra'
var uniqid = require('uniqid');
const postcss = require('postcss');
const postcssrc = require('postcss-load-config');
const postcssNested = require('postcss-nested')
const autoprefixer = require('autoprefixer')


// Get rules definitions
Expand Down Expand Up @@ -52,7 +54,7 @@ function genStyles(utility, acc) {
async function processPostCSS(src, callback) {
const ctx = { parser: true, map: 'inline' };
const { plugins, options } = postcssrc.sync(ctx);
const { css } = await postcss(plugins).process(src, { from: undefined });
const { css } = await postcss([postcssNested(), autoprefixer(), ...plugins]).process(src, { from: undefined });


callback(css)
Expand Down

0 comments on commit 3a19f43

Please sign in to comment.