@parcel/transformer-postcss 2.9.3 → 2.10.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.
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
function
|
|
8
|
-
const data = require("@parcel/
|
|
9
|
-
|
|
7
|
+
function _rust() {
|
|
8
|
+
const data = require("@parcel/rust");
|
|
9
|
+
_rust = function () {
|
|
10
10
|
return data;
|
|
11
11
|
};
|
|
12
12
|
return data;
|
|
@@ -205,7 +205,7 @@ var _default = new (_plugin().Transformer)({
|
|
|
205
205
|
plugins.push(postcssModules({
|
|
206
206
|
getJSON: (filename, json) => cssModules = json,
|
|
207
207
|
Loader: await createLoader(asset, resolve, options),
|
|
208
|
-
generateScopedName: (name, filename) => `${name}_${(0,
|
|
208
|
+
generateScopedName: (name, filename) => `${name}_${(0, _rust().hashString)(_path().default.relative(options.projectRoot, filename)).substr(0, 6)}`,
|
|
209
209
|
...config.hydrated.modules
|
|
210
210
|
}));
|
|
211
211
|
if (code == null || COMPOSES_RE.test(code)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/transformer-postcss",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"source": "src/PostCSSTransformer.js",
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">= 12.0.0",
|
|
20
|
-
"parcel": "^2.
|
|
20
|
+
"parcel": "^2.10.1"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@parcel/diagnostic": "2.
|
|
24
|
-
"@parcel/
|
|
25
|
-
"@parcel/
|
|
26
|
-
"@parcel/utils": "2.
|
|
23
|
+
"@parcel/diagnostic": "2.10.1",
|
|
24
|
+
"@parcel/plugin": "2.10.1",
|
|
25
|
+
"@parcel/rust": "2.10.1",
|
|
26
|
+
"@parcel/utils": "2.10.1",
|
|
27
27
|
"clone": "^2.1.1",
|
|
28
28
|
"nullthrows": "^1.1.1",
|
|
29
29
|
"postcss-value-parser": "^4.2.0",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"postcss": "^8.4.5",
|
|
34
34
|
"postcss-modules": "^4.3.1"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "bba0417f68159b1f71c747cfd06fa3fe2dd374b5"
|
|
37
37
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import type {FilePath, Asset, MutableAsset, PluginOptions} from '@parcel/types';
|
|
4
4
|
|
|
5
|
-
import {hashString} from '@parcel/
|
|
5
|
+
import {hashString} from '@parcel/rust';
|
|
6
6
|
import {glob} from '@parcel/utils';
|
|
7
7
|
import {Transformer} from '@parcel/plugin';
|
|
8
8
|
import nullthrows from 'nullthrows';
|