Skip to content

Commit a0d6793

Browse files
authored
Merge pull request #5 from steveblue/bugfix/output
fix: call to postcss
2 parents b4ede3a + edfbd96 commit a0d6793

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
33
// rollup-plugin-inline-postcss.js
44
const findup = require("findup");
55
const path = require("path");
6-
const postcss_1 = require("postcss");
76
const rollup_pluginutils_1 = require("rollup-pluginutils");
7+
const postcss = require('postcss');
88
function inlinePostCSS(options = {}) {
99
const filter = rollup_pluginutils_1.createFilter(options.include, options.exclude);
1010
const styleRegex = options.styleRegex
@@ -50,7 +50,7 @@ function inlinePostCSS(options = {}) {
5050
: Object.keys(config.plugins)
5151
.filter((key) => config.plugins[key])
5252
.map((key) => require(key));
53-
return postcss_1.default(outputConfig)
53+
return postcss(outputConfig)
5454
.process(css, opts)
5555
.then((result) => {
5656
code = code.replace(styleRegex, `\`${result.css}\`${punc ? punc : ''}`);

index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// rollup-plugin-inline-postcss.js
22
import * as findup from 'findup';
33
import * as path from 'path';
4-
import postcss from 'postcss';
54
import { createFilter } from 'rollup-pluginutils';
65

6+
const postcss = require('postcss');
7+
78
export default function inlinePostCSS(options: any = {}) {
89
const filter = createFilter(options.include, options.exclude);
910
const styleRegex = options.styleRegex

0 commit comments

Comments
 (0)