@financial-times/dotcom-build-sass 10.1.0 → 10.3.0

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.
@@ -51,6 +51,9 @@ class PageKitSassPlugin {
51
51
  const postcssLoaderOptions = {
52
52
  postcssOptions: {
53
53
  plugins: [
54
+ // Allow @import of CSS files from node_modules
55
+ // https://github.com/postcss/postcss-import
56
+ require('postcss-import')(),
54
57
  // Add vendor prefixes automatically using data from Can I Use
55
58
  // https://github.com/postcss/autoprefixer
56
59
  require('autoprefixer')(autoprefixerOptions),
@@ -63,6 +66,9 @@ class PageKitSassPlugin {
63
66
  implementation: require('postcss')
64
67
  };
65
68
  const cssLoaderOptions = {
69
+ // sass-loader then postcss-loader run first
70
+ // https://github.com/webpack-contrib/css-loader/blob/22e16e2fc88f920571219570953d3da5702d4fdb/README.md?plain=1#L921
71
+ importLoaders: 2,
66
72
  // Allow css-loader to resolve @import because the sass-loader
67
73
  // does not successfully resolve files with a .css extension.
68
74
  import: true,
@@ -452,7 +452,7 @@
452
452
  "affectsGlobalScope": false
453
453
  },
454
454
  "../src/index.ts": {
455
- "version": "1ce57a946d739703fe823574857b093f8ce75836a0b4f6f0a7cdd7869ae61972",
455
+ "version": "749c87ca56b2f3888da51f530532365f42aa9926687931ab0f064c965daf874f",
456
456
  "signature": "74262782cc0e8e7f07d44046b78a6f97239ae1d2282c2763ac54e90f909bbbd5",
457
457
  "affectsGlobalScope": false
458
458
  },
@@ -731,6 +731,11 @@
731
731
  "signature": "b82fc740467e59abe3d6170417e461527d2a95610f55915fc59557c4b7be55ba",
732
732
  "affectsGlobalScope": false
733
733
  },
734
+ "../../../node_modules/@types/lodash.uniqueid/index.d.ts": {
735
+ "version": "f7bc2eb97d6cd2821d4b8cff502655b71bcafd633598d7acc46ef9cfe85b3915",
736
+ "signature": "f7bc2eb97d6cd2821d4b8cff502655b71bcafd633598d7acc46ef9cfe85b3915",
737
+ "affectsGlobalScope": false
738
+ },
734
739
  "../../../node_modules/@types/mdast/index.d.ts": {
735
740
  "version": "202f8582ee3cd89e06c4a17d8aabb925ff8550370559c771d1cc3ec3934071c2",
736
741
  "signature": "202f8582ee3cd89e06c4a17d8aabb925ff8550370559c771d1cc3ec3934071c2",
@@ -1149,6 +1154,9 @@
1149
1154
  "../../../node_modules/jest-matcher-utils/build/index.d.ts",
1150
1155
  "../../../node_modules/pretty-format/build/index.d.ts"
1151
1156
  ],
1157
+ "../../../node_modules/@types/lodash.uniqueid/index.d.ts": [
1158
+ "../../../node_modules/@types/lodash/index.d.ts"
1159
+ ],
1152
1160
  "../../../node_modules/@types/lodash/common/array.d.ts": [
1153
1161
  "../../../node_modules/@types/lodash/common/collection.d.ts",
1154
1162
  "../../../node_modules/@types/lodash/common/common.d.ts",
@@ -1907,6 +1915,9 @@
1907
1915
  "../../../node_modules/jest-matcher-utils/build/index.d.ts",
1908
1916
  "../../../node_modules/pretty-format/build/index.d.ts"
1909
1917
  ],
1918
+ "../../../node_modules/@types/lodash.uniqueid/index.d.ts": [
1919
+ "../../../node_modules/@types/lodash/index.d.ts"
1920
+ ],
1910
1921
  "../../../node_modules/@types/lodash/common/array.d.ts": [
1911
1922
  "../../../node_modules/@types/lodash/common/collection.d.ts",
1912
1923
  "../../../node_modules/@types/lodash/common/common.d.ts",
@@ -2619,6 +2630,7 @@
2619
2630
  "../../../node_modules/@types/jest/index.d.ts",
2620
2631
  "../../../node_modules/@types/json-schema/index.d.ts",
2621
2632
  "../../../node_modules/@types/json5/index.d.ts",
2633
+ "../../../node_modules/@types/lodash.uniqueid/index.d.ts",
2622
2634
  "../../../node_modules/@types/lodash/common/array.d.ts",
2623
2635
  "../../../node_modules/@types/lodash/common/collection.d.ts",
2624
2636
  "../../../node_modules/@types/lodash/common/common.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/dotcom-build-sass",
3
- "version": "10.1.0",
3
+ "version": "10.3.0",
4
4
  "description": "",
5
5
  "main": "dist/node/index.js",
6
6
  "types": "dist/node/index.d.ts",
@@ -22,10 +22,11 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "autoprefixer": "^10.2.5",
25
- "postcss": "^8.4.20",
26
25
  "css-loader": "^3.0.0",
27
26
  "cssnano": "^4.1.10",
28
27
  "mini-css-extract-plugin": "^0.12.0",
28
+ "postcss": "^8.4.20",
29
+ "postcss-import": "^16.1.0",
29
30
  "postcss-loader": "^4.0.0",
30
31
  "sass": "^1.77.2",
31
32
  "sass-embedded": "^1.77.2",
package/src/index.ts CHANGED
@@ -71,6 +71,9 @@ export class PageKitSassPlugin {
71
71
  const postcssLoaderOptions = {
72
72
  postcssOptions: {
73
73
  plugins: [
74
+ // Allow @import of CSS files from node_modules
75
+ // https://github.com/postcss/postcss-import
76
+ require('postcss-import')(),
74
77
  // Add vendor prefixes automatically using data from Can I Use
75
78
  // https://github.com/postcss/autoprefixer
76
79
  require('autoprefixer')(autoprefixerOptions),
@@ -84,6 +87,9 @@ export class PageKitSassPlugin {
84
87
  }
85
88
 
86
89
  const cssLoaderOptions = {
90
+ // sass-loader then postcss-loader run first
91
+ // https://github.com/webpack-contrib/css-loader/blob/22e16e2fc88f920571219570953d3da5702d4fdb/README.md?plain=1#L921
92
+ importLoaders: 2,
87
93
  // Allow css-loader to resolve @import because the sass-loader
88
94
  // does not successfully resolve files with a .css extension.
89
95
  import: true,