postcss
Advanced tools
Comparing version 8.2.7 to 8.2.8
# Change Log | ||
This project adheres to [Semantic Versioning](https://semver.org/). | ||
## 8.2.8 | ||
* Fixed browser builds in webpack 4 (by Matt Jones). | ||
## 8.2.7 | ||
@@ -5,0 +8,0 @@ * Fixed browser builds in webpack 5 (by Matt Jones). |
@@ -50,2 +50,4 @@ import { FilePosition } from './input.js' | ||
stack: string | ||
/** | ||
@@ -52,0 +54,0 @@ * Always equal to `'CssSyntaxError'`. You should always check error type |
@@ -13,2 +13,4 @@ 'use strict' | ||
let pathAvailable = Boolean(resolve && isAbsolute) | ||
class Input { | ||
@@ -34,3 +36,7 @@ constructor (css, opts = {}) { | ||
if (opts.from) { | ||
if (/^\w+:\/\//.test(opts.from) || isAbsolute(opts.from)) { | ||
if ( | ||
!pathAvailable || | ||
/^\w+:\/\//.test(opts.from) || | ||
isAbsolute(opts.from) | ||
) { | ||
this.file = opts.from | ||
@@ -42,7 +48,9 @@ } else { | ||
let map = new PreviousMap(this.css, opts) | ||
if (map.text) { | ||
this.map = map | ||
let file = map.consumer().file | ||
if (!this.file && file) this.file = this.mapResolve(file) | ||
if (pathAvailable) { | ||
let map = new PreviousMap(this.css, opts) | ||
if (map.text) { | ||
this.map = map | ||
let file = map.consumer().file | ||
if (!this.file && file) this.file = this.mapResolve(file) | ||
} | ||
} | ||
@@ -49,0 +57,0 @@ |
@@ -7,2 +7,4 @@ 'use strict' | ||
let pathAvailable = Boolean(dirname, resolve, relative, sep) | ||
class MapGenerator { | ||
@@ -279,3 +281,3 @@ constructor (stringify, root, opts) { | ||
if (this.isMap()) { | ||
if (pathAvailable && this.isMap()) { | ||
return this.generateMap() | ||
@@ -282,0 +284,0 @@ } |
@@ -8,3 +8,3 @@ 'use strict' | ||
constructor (plugins = []) { | ||
this.version = '8.2.7' | ||
this.version = '8.2.8' | ||
this.plugins = this.normalize(plugins) | ||
@@ -11,0 +11,0 @@ } |
{ | ||
"name": "postcss", | ||
"version": "8.2.7", | ||
"version": "8.2.8", | ||
"description": "Tool for transforming styles with JS plugins", | ||
@@ -5,0 +5,0 @@ "engines": { |
204424
5785