Skip to content

Commit

Permalink
Revert "fix postcss plugin cwd for relative imports"
Browse files Browse the repository at this point in the history
This reverts commit a05e56c.
  • Loading branch information
FredKSchott committed Dec 13, 2020
1 parent 9492843 commit d4292d7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/plugin-postcss/plugin.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
const path = require('path');
const execa = require('execa');

module.exports = function postcssPlugin(_, options) {
return {
name: '@snowpack/postcss-transform',
async transform({id, fileExt, contents}) {
async transform({fileExt, contents}) {
const {input = ['.css'], config} = options;
if (!input.includes(fileExt) || !contents) return;

const flags = [];
if (config) flags.push(`--config ${config}`);

const {stdout} = await execa('postcss', flags, {
cwd: path.dirname(id),
cwd: process.cwd(),
input: contents,
});

Expand Down

0 comments on commit d4292d7

Please sign in to comment.