@parcel/transformer-css 2.7.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/CSSTransformer.js +6 -6
- package/package.json +8 -8
- package/src/CSSTransformer.js +1 -1
package/lib/CSSTransformer.js
CHANGED
|
@@ -35,10 +35,10 @@ function _plugin() {
|
|
|
35
35
|
return data;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
function
|
|
39
|
-
const data = require("
|
|
38
|
+
function _lightningcss() {
|
|
39
|
+
const data = require("lightningcss");
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
_lightningcss = function () {
|
|
42
42
|
return data;
|
|
43
43
|
};
|
|
44
44
|
|
|
@@ -126,7 +126,7 @@ var _default = new (_plugin().Transformer)({
|
|
|
126
126
|
|
|
127
127
|
try {
|
|
128
128
|
if (asset.meta.type === 'attr') {
|
|
129
|
-
res = (0,
|
|
129
|
+
res = (0, _lightningcss().transformStyleAttribute)({
|
|
130
130
|
code,
|
|
131
131
|
analyzeDependencies: true,
|
|
132
132
|
errorRecovery: (config === null || config === void 0 ? void 0 : config.errorRecovery) || false,
|
|
@@ -147,7 +147,7 @@ var _default = new (_plugin().Transformer)({
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
res = (0,
|
|
150
|
+
res = (0, _lightningcss().transform)({
|
|
151
151
|
filename: _path().default.relative(options.projectRoot, asset.filePath),
|
|
152
152
|
code,
|
|
153
153
|
cssModules,
|
|
@@ -363,7 +363,7 @@ function getTargets(browsers) {
|
|
|
363
363
|
return cached;
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
-
let targets = (0,
|
|
366
|
+
let targets = (0, _lightningcss().browserslistToTargets)((0, _browserslist().default)(browsers));
|
|
367
367
|
cache.set(browsers, targets);
|
|
368
368
|
return targets;
|
|
369
369
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/transformer-css",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
"source": "src/CSSTransformer.js",
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">= 12.0.0",
|
|
20
|
-
"parcel": "^2.
|
|
20
|
+
"parcel": "^2.8.1"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@parcel/
|
|
24
|
-
"@parcel/
|
|
25
|
-
"@parcel/
|
|
26
|
-
"@parcel/
|
|
27
|
-
"@parcel/utils": "2.7.0",
|
|
23
|
+
"@parcel/diagnostic": "2.8.1",
|
|
24
|
+
"@parcel/plugin": "2.8.1",
|
|
25
|
+
"@parcel/source-map": "^2.1.1",
|
|
26
|
+
"@parcel/utils": "2.8.1",
|
|
28
27
|
"browserslist": "^4.6.6",
|
|
28
|
+
"lightningcss": "^1.16.1",
|
|
29
29
|
"nullthrows": "^1.1.1"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "f8d3fc30ca5b33d8f8674525f2a741d662c5986a"
|
|
32
32
|
}
|
package/src/CSSTransformer.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
transform,
|
|
8
8
|
transformStyleAttribute,
|
|
9
9
|
browserslistToTargets,
|
|
10
|
-
} from '
|
|
10
|
+
} from 'lightningcss';
|
|
11
11
|
import {remapSourceLocation, relativePath} from '@parcel/utils';
|
|
12
12
|
import browserslist from 'browserslist';
|
|
13
13
|
import nullthrows from 'nullthrows';
|