rollup-plugin-postcss
Advanced tools
Comparing version 0.0.26 to 0.0.27
@@ -32,3 +32,3 @@ 'use strict'; | ||
map: { | ||
inline: options.inline === undefined ? false : options.inline, | ||
inline: false, | ||
annotation: false | ||
@@ -38,6 +38,7 @@ } | ||
return postcss(options.plugins || []).process(code, opts).then(function (result) { | ||
result.css = 'export default ' + injectFnName + '(' + JSON.stringify(result.css) + ');'; | ||
var code = 'export default ' + injectFnName + '(' + JSON.stringify(result.css) + ');'; | ||
var map = options.sourceMap && result.map ? JSON.parse(result.map) : { mappings: '' }; | ||
return { | ||
code: result.css, | ||
map: { mappings: '' } | ||
code: code, | ||
map: map | ||
}; | ||
@@ -44,0 +45,0 @@ }); |
{ | ||
"name": "rollup-plugin-postcss", | ||
"version": "0.0.26", | ||
"version": "0.0.27", | ||
"description": "Seamless integration between Rollup and PostCSS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,3 +25,3 @@ import { createFilter } from 'rollup-pluginutils'; | ||
map: { | ||
inline: options.inline === undefined ? false : options.inline, | ||
inline: false, | ||
annotation: false | ||
@@ -33,6 +33,9 @@ } | ||
.then(result => { | ||
result.css = `export default ${injectFnName}(${JSON.stringify(result.css)});` | ||
const code = `export default ${injectFnName}(${JSON.stringify(result.css)});`; | ||
const map = options.sourceMap && result.map | ||
? JSON.parse(result.map) | ||
: { mappings: '' }; | ||
return { | ||
code: result.css, | ||
map: { mappings: '' } | ||
code, | ||
map | ||
}; | ||
@@ -39,0 +42,0 @@ }); |
Sorry, the diff of this file is not supported yet
6441
9
95