diff --git a/dist/index.js b/dist/index.js index 9e281cf..54a0917 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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 @@ -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 : ''}`); diff --git a/index.ts b/index.ts index eb690df..1909cec 100644 --- a/index.ts +++ b/index.ts @@ -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