rollup-plugin-css-only
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -14,2 +14,3 @@ 'use strict'; | ||
var dest = options.output | ||
var changes = 0 | ||
@@ -31,4 +32,8 @@ return { | ||
// Map of every stylesheet | ||
styles[id] = code | ||
// Keep track of every stylesheet | ||
// Check if it changed since last render | ||
if (styles[id] !== code && (styles[id] || code)) { | ||
styles[id] = code | ||
changes++ | ||
} | ||
@@ -39,5 +44,6 @@ return '' | ||
// No stylesheet needed | ||
if (options.output === false) { | ||
if (!changes || options.output === false) { | ||
return | ||
} | ||
changes = 0 | ||
@@ -44,0 +50,0 @@ // Combine all stylesheets |
@@ -10,2 +10,3 @@ import { writeFile } from 'fs'; | ||
var dest = options.output | ||
var changes = 0 | ||
@@ -27,4 +28,8 @@ return { | ||
// Map of every stylesheet | ||
styles[id] = code | ||
// Keep track of every stylesheet | ||
// Check if it changed since last render | ||
if (styles[id] !== code && (styles[id] || code)) { | ||
styles[id] = code | ||
changes++ | ||
} | ||
@@ -35,5 +40,6 @@ return '' | ||
// No stylesheet needed | ||
if (options.output === false) { | ||
if (!changes || options.output === false) { | ||
return | ||
} | ||
changes = 0 | ||
@@ -40,0 +46,0 @@ // Combine all stylesheets |
{ | ||
"name": "rollup-plugin-css-only", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Rollup plugin that bundles imported css", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
10014
5
165