Skip to content

Commit

Permalink
Merge pull request #5 from steveblue/bugfix/output
Browse files Browse the repository at this point in the history
fix: call to postcss
  • Loading branch information
steveblue authored Jan 20, 2021
2 parents b4ede3a + edfbd96 commit a0d6793
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
// rollup-plugin-inline-postcss.js
const findup = require("findup");
const path = require("path");
const postcss_1 = require("postcss");
const rollup_pluginutils_1 = require("rollup-pluginutils");
const postcss = require('postcss');
function inlinePostCSS(options = {}) {
const filter = rollup_pluginutils_1.createFilter(options.include, options.exclude);
const styleRegex = options.styleRegex
Expand Down Expand Up @@ -50,7 +50,7 @@ function inlinePostCSS(options = {}) {
: Object.keys(config.plugins)
.filter((key) => config.plugins[key])
.map((key) => require(key));
return postcss_1.default(outputConfig)
return postcss(outputConfig)
.process(css, opts)
.then((result) => {
code = code.replace(styleRegex, `\`${result.css}\`${punc ? punc : ''}`);
Expand Down
3 changes: 2 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// rollup-plugin-inline-postcss.js
import * as findup from 'findup';
import * as path from 'path';
import postcss from 'postcss';
import { createFilter } from 'rollup-pluginutils';

const postcss = require('postcss');

export default function inlinePostCSS(options: any = {}) {
const filter = createFilter(options.include, options.exclude);
const styleRegex = options.styleRegex
Expand Down

0 comments on commit a0d6793

Please sign in to comment.