@swissquote/crafty-preset-lightningcss 1.24.0 → 1.25.0-alpha.3

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.
@@ -38,7 +38,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
38
38
  async function loader(content, map, meta) {
39
39
  const rawOptions = this.getOptions(_options.default);
40
40
  const callback = this.async();
41
- if (this._compiler && this._compiler.options && this._compiler.options.experiments && this._compiler.options.experiments.css && this._module && this._module.type === "css") {
41
+ if (this._compiler && this._compiler.options && this._compiler.options.experiments && this._compiler.options.experiments.css && this._module && (this._module.type === "css" || this._module.type === "css/auto" || this._module.type === "css/global" || this._module.type === "css/module")) {
42
42
  this.emitWarning(new Error('You can\'t use `experiments.css` (`experiments.futureDefaults` enable built-in CSS support by default) and `css-loader` together, please set `experiments.css` to `false` or set `{ type: "javascript/auto" }` for rules with `css-loader` in your webpack config (now css-loader does nothing).'));
43
43
  callback(null, content, map, meta);
44
44
  return;
@@ -98,7 +98,6 @@ async function loader(content, map, meta) {
98
98
  // Support data urls as input in new URL added in webpack@5.38.0
99
99
  }));
100
100
  }
101
-
102
101
  const icssPluginImports = [];
103
102
  const icssPluginApi = [];
104
103
  const needToUseIcssPlugin = (0, _utils.shouldUseIcssPlugin)(options);
@@ -346,8 +345,7 @@ const plugin = (options = {}) => {
346
345
  };
347
346
  };
348
347
  plugin.postcss = true;
349
- var _default = plugin;
350
- exports["default"] = _default;
348
+ var _default = exports["default"] = plugin;
351
349
 
352
350
  /***/ }),
353
351
 
@@ -636,8 +634,7 @@ const plugin = (options = {}) => {
636
634
  };
637
635
  };
638
636
  plugin.postcss = true;
639
- var _default = plugin;
640
- exports["default"] = _default;
637
+ var _default = exports["default"] = plugin;
641
638
 
642
639
  /***/ }),
643
640
 
@@ -1000,8 +997,7 @@ const plugin = (options = {}) => {
1000
997
  };
1001
998
  };
1002
999
  plugin.postcss = true;
1003
- var _default = plugin;
1004
- exports["default"] = _default;
1000
+ var _default = exports["default"] = plugin;
1005
1001
 
1006
1002
  /***/ }),
1007
1003
 
@@ -1052,8 +1048,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
1052
1048
  Author Tobias Koppers @sokra
1053
1049
  */
1054
1050
 
1055
- const WEBPACK_IGNORE_COMMENT_REGEXP = /webpackIgnore:(\s+)?(true|false)/;
1056
- exports.WEBPACK_IGNORE_COMMENT_REGEXP = WEBPACK_IGNORE_COMMENT_REGEXP;
1051
+ const WEBPACK_IGNORE_COMMENT_REGEXP = exports.WEBPACK_IGNORE_COMMENT_REGEXP = /webpackIgnore:(\s+)?(true|false)/;
1057
1052
  const matchRelativePath = /^\.\.?[/\\]/;
1058
1053
  function isAbsolutePath(str) {
1059
1054
  return _path.default.posix.isAbsolute(str) || _path.default.win32.isAbsolute(str);
@@ -1499,7 +1494,8 @@ function getModulesOptions(rawOptions, exportType, loaderContext) {
1499
1494
  namedExport: needNamedExport || false,
1500
1495
  exportLocalsConvention: (rawModulesOptions.namedExport === true || needNamedExport) && typeof rawModulesOptions.exportLocalsConvention === "undefined" ? "camelCaseOnly" : "asIs",
1501
1496
  exportOnlyLocals: false,
1502
- ...rawModulesOptions
1497
+ ...rawModulesOptions,
1498
+ useExportsAs: rawModulesOptions.exportLocalsConvention === "asIs"
1503
1499
  };
1504
1500
  let exportLocalsConventionType;
1505
1501
  if (typeof modulesOptions.exportLocalsConvention === "string") {
@@ -1546,17 +1542,21 @@ function getModulesOptions(rawOptions, exportType, loaderContext) {
1546
1542
  return false;
1547
1543
  }
1548
1544
  } else if (typeof modulesOptions.auto === "function") {
1549
- const isModule = modulesOptions.auto(resourcePath);
1545
+ const {
1546
+ resourceQuery,
1547
+ resourceFragment
1548
+ } = loaderContext;
1549
+ const isModule = modulesOptions.auto(resourcePath, resourceQuery, resourceFragment);
1550
1550
  if (!isModule) {
1551
1551
  return false;
1552
1552
  }
1553
1553
  }
1554
1554
  if (typeof modulesOptions.mode === "function") {
1555
- modulesOptions.mode = modulesOptions.mode(loaderContext.resourcePath);
1555
+ modulesOptions.mode = modulesOptions.mode(loaderContext.resourcePath, loaderContext.resourceQuery, loaderContext.resourceFragment);
1556
1556
  }
1557
1557
  if (needNamedExport) {
1558
1558
  if (rawOptions.esModule === false) {
1559
- throw new Error("The 'exportType' option with the 'css-style-sheet' or 'string' value requires the 'esModules' option to be enabled");
1559
+ throw new Error("The 'exportType' option with the 'css-style-sheet' or 'string' value requires the 'esModule' option to be enabled");
1560
1560
  }
1561
1561
  if (modulesOptions.namedExport === false) {
1562
1562
  throw new Error("The 'exportType' option with the 'css-style-sheet' or 'string' value requires the 'modules.namedExport' option to be enabled");
@@ -1564,9 +1564,9 @@ function getModulesOptions(rawOptions, exportType, loaderContext) {
1564
1564
  }
1565
1565
  if (modulesOptions.namedExport === true) {
1566
1566
  if (rawOptions.esModule === false) {
1567
- throw new Error("The 'modules.namedExport' option requires the 'esModules' option to be enabled");
1567
+ throw new Error("The 'modules.namedExport' option requires the 'esModule' option to be enabled");
1568
1568
  }
1569
- if (typeof exportLocalsConventionType === "string" && exportLocalsConventionType !== "camelCaseOnly" && exportLocalsConventionType !== "dashesOnly") {
1569
+ if (typeof exportLocalsConventionType === "string" && exportLocalsConventionType !== "asIs" && exportLocalsConventionType !== "camelCaseOnly" && exportLocalsConventionType !== "dashesOnly") {
1570
1570
  throw new Error('The "modules.namedExport" option requires the "modules.exportLocalsConvention" option to be "camelCaseOnly" or "dashesOnly"');
1571
1571
  }
1572
1572
  }
@@ -1630,7 +1630,7 @@ function getModulesPlugins(options, loaderContext) {
1630
1630
  plugins = [_postcssModulesValues.default, (0, _postcssModulesLocalByDefault.default)({
1631
1631
  mode
1632
1632
  }), (0, _postcssModulesExtractImports.default)(), (0, _postcssModulesScope.default)({
1633
- generateScopedName(exportName) {
1633
+ generateScopedName(exportName, resourceFile, rawCss, node) {
1634
1634
  let localIdent;
1635
1635
  if (typeof getLocalIdent !== "undefined") {
1636
1636
  localIdent = getLocalIdent(loaderContext, localIdentName, unescape(exportName), {
@@ -1640,7 +1640,8 @@ function getModulesPlugins(options, loaderContext) {
1640
1640
  hashDigest: localIdentHashDigest,
1641
1641
  hashDigestLength: localIdentHashDigestLength,
1642
1642
  hashStrategy,
1643
- regExp: localIdentRegExp
1643
+ regExp: localIdentRegExp,
1644
+ node
1644
1645
  });
1645
1646
  }
1646
1647
 
@@ -1654,7 +1655,8 @@ function getModulesPlugins(options, loaderContext) {
1654
1655
  hashDigest: localIdentHashDigest,
1655
1656
  hashDigestLength: localIdentHashDigestLength,
1656
1657
  hashStrategy,
1657
- regExp: localIdentRegExp
1658
+ regExp: localIdentRegExp,
1659
+ node
1658
1660
  });
1659
1661
  return escapeLocalIdent(localIdent).replace(/\\\[local\\]/gi, exportName);
1660
1662
  }
@@ -1878,16 +1880,25 @@ function getExportCode(exports, replacements, icssPluginUsed, options, isTemplat
1878
1880
  let code = "// Exports\n";
1879
1881
  if (icssPluginUsed) {
1880
1882
  let localsCode = "";
1883
+ let identifierId = 0;
1881
1884
  const addExportToLocalsCode = (names, value) => {
1882
1885
  const normalizedNames = Array.isArray(names) ? new Set(names) : new Set([names]);
1883
1886
  for (const name of normalizedNames) {
1887
+ const serializedValue = isTemplateLiteralSupported ? convertToTemplateLiteral(value) : JSON.stringify(value);
1884
1888
  if (options.modules.namedExport) {
1885
- localsCode += `export var ${name} = ${isTemplateLiteralSupported ? convertToTemplateLiteral(value) : JSON.stringify(value)};\n`;
1889
+ if (options.modules.useExportsAs) {
1890
+ identifierId += 1;
1891
+ const id = `_${identifierId.toString(16)}`;
1892
+ localsCode += `var ${id} = ${serializedValue};\n`;
1893
+ localsCode += `export { ${id} as ${JSON.stringify(name)} };\n`;
1894
+ } else {
1895
+ localsCode += `export var ${name} = ${serializedValue};\n`;
1896
+ }
1886
1897
  } else {
1887
1898
  if (localsCode) {
1888
1899
  localsCode += `,\n`;
1889
1900
  }
1890
- localsCode += `\t${JSON.stringify(name)}: ${isTemplateLiteralSupported ? convertToTemplateLiteral(value) : JSON.stringify(value)}`;
1901
+ localsCode += `\t${JSON.stringify(name)}: ${serializedValue}`;
1891
1902
  }
1892
1903
  }
1893
1904
  };
@@ -3159,6 +3170,11 @@ function localizeNode(rule, mode, localAliasMap) {
3159
3170
 
3160
3171
  break;
3161
3172
  }
3173
+ case "nesting": {
3174
+ if (node.value === "&") {
3175
+ context.hasLocals = true;
3176
+ }
3177
+ }
3162
3178
  }
3163
3179
 
3164
3180
  context.lastWasSpacing = false;
@@ -3286,7 +3302,7 @@ function localizeDeclaration(declaration, context) {
3286
3302
 
3287
3303
  // We don't validate `hex digits`, because we don't need it, it is work of linters.
3288
3304
  const validIdent =
3289
- /^-?([a-z\u0080-\uFFFF_]|(\\[^\r\n\f])|-)((\\[^\r\n\f])|[a-z\u0080-\uFFFF_0-9-])*$/i;
3305
+ /^-?([a-z\u0080-\uFFFF_]|(\\[^\r\n\f])|-(?![0-9]))((\\[^\r\n\f])|[a-z\u0080-\uFFFF_0-9-])*$/i;
3290
3306
 
3291
3307
  /*
3292
3308
  The spec defines some keywords that you can use to describe properties such as the timing
@@ -3448,10 +3464,12 @@ module.exports = (options = {}) => {
3448
3464
  } else if (localMatch) {
3449
3465
  atRule.params = localMatch[0];
3450
3466
  globalKeyframes = false;
3451
- } else if (!globalMode) {
3452
- if (atRule.params && !localAliasMap.has(atRule.params)) {
3453
- atRule.params = ":local(" + atRule.params + ")";
3454
- }
3467
+ } else if (
3468
+ atRule.params &&
3469
+ !globalMode &&
3470
+ !localAliasMap.has(atRule.params)
3471
+ ) {
3472
+ atRule.params = ":local(" + atRule.params + ")";
3455
3473
  }
3456
3474
 
3457
3475
  atRule.walkDecls((declaration) => {
@@ -3461,6 +3479,42 @@ module.exports = (options = {}) => {
3461
3479
  global: globalKeyframes,
3462
3480
  });
3463
3481
  });
3482
+ } else if (/scope$/i.test(atRule.name)) {
3483
+ atRule.params = atRule.params
3484
+ .split("to")
3485
+ .map((item) => {
3486
+ const selector = item.trim().slice(1, -1).trim();
3487
+ const context = localizeNode(
3488
+ selector,
3489
+ options.mode,
3490
+ localAliasMap
3491
+ );
3492
+
3493
+ context.options = options;
3494
+ context.localAliasMap = localAliasMap;
3495
+
3496
+ if (pureMode && context.hasPureGlobals) {
3497
+ throw atRule.error(
3498
+ 'Selector in at-rule"' +
3499
+ selector +
3500
+ '" is not pure ' +
3501
+ "(pure selectors must contain at least one local class or id)"
3502
+ );
3503
+ }
3504
+
3505
+ return `(${context.selector})`;
3506
+ })
3507
+ .join(" to ");
3508
+
3509
+ atRule.nodes.forEach((declaration) => {
3510
+ if (declaration.type === "decl") {
3511
+ localizeDeclaration(declaration, {
3512
+ localAliasMap,
3513
+ options: options,
3514
+ global: globalMode,
3515
+ });
3516
+ }
3517
+ });
3464
3518
  } else if (atRule.nodes) {
3465
3519
  atRule.nodes.forEach((declaration) => {
3466
3520
  if (declaration.type === "decl") {
@@ -3527,7 +3581,23 @@ const selectorParser = __nccwpck_require__(3273);
3527
3581
 
3528
3582
  const hasOwnProperty = Object.prototype.hasOwnProperty;
3529
3583
 
3530
- function getSingleLocalNamesForComposes(root) {
3584
+ function isNestedRule(rule) {
3585
+ if (!rule.parent || rule.parent.type === "root") {
3586
+ return false;
3587
+ }
3588
+
3589
+ if (rule.parent.type === "rule") {
3590
+ return true;
3591
+ }
3592
+
3593
+ return isNestedRule(rule.parent);
3594
+ }
3595
+
3596
+ function getSingleLocalNamesForComposes(root, rule) {
3597
+ if (isNestedRule(rule)) {
3598
+ throw new Error(`composition is not allowed in nested rule \n\n${rule}`);
3599
+ }
3600
+
3531
3601
  return root.nodes.map((node) => {
3532
3602
  if (node.type !== "selector" || node.nodes.length !== 1) {
3533
3603
  throw new Error(
@@ -3614,20 +3684,26 @@ const plugin = (options = {}) => {
3614
3684
  Once(root, { rule }) {
3615
3685
  const exports = Object.create(null);
3616
3686
 
3617
- function exportScopedName(name, rawName) {
3687
+ function exportScopedName(name, rawName, node, needExport = true) {
3618
3688
  const scopedName = generateScopedName(
3619
3689
  rawName ? rawName : name,
3620
3690
  root.source.input.from,
3621
- root.source.input.css
3691
+ root.source.input.css,
3692
+ node
3622
3693
  );
3623
3694
  const exportEntry = generateExportEntry(
3624
3695
  rawName ? rawName : name,
3625
3696
  scopedName,
3626
3697
  root.source.input.from,
3627
- root.source.input.css
3698
+ root.source.input.css,
3699
+ node
3628
3700
  );
3629
3701
  const { key, value } = exportEntry;
3630
3702
 
3703
+ if (!needExport) {
3704
+ return scopedName;
3705
+ }
3706
+
3631
3707
  exports[key] = exports[key] || [];
3632
3708
 
3633
3709
  if (exports[key].indexOf(value) < 0) {
@@ -3637,26 +3713,40 @@ const plugin = (options = {}) => {
3637
3713
  return scopedName;
3638
3714
  }
3639
3715
 
3640
- function localizeNode(node) {
3716
+ function localizeNode(node, needExport = true) {
3641
3717
  switch (node.type) {
3642
3718
  case "selector":
3643
- node.nodes = node.map(localizeNode);
3719
+ node.nodes = node.map((item) => localizeNode(item, needExport));
3644
3720
  return node;
3645
3721
  case "class":
3646
3722
  return selectorParser.className({
3647
3723
  value: exportScopedName(
3648
3724
  node.value,
3649
- node.raws && node.raws.value ? node.raws.value : null
3725
+ node.raws && node.raws.value ? node.raws.value : null,
3726
+ node,
3727
+ needExport
3650
3728
  ),
3651
3729
  });
3652
3730
  case "id": {
3653
3731
  return selectorParser.id({
3654
3732
  value: exportScopedName(
3655
3733
  node.value,
3656
- node.raws && node.raws.value ? node.raws.value : null
3734
+ node.raws && node.raws.value ? node.raws.value : null,
3735
+ node,
3736
+ needExport
3657
3737
  ),
3658
3738
  });
3659
3739
  }
3740
+ case "attribute": {
3741
+ if (node.attribute === "class" && node.operator === "=") {
3742
+ return selectorParser.attribute({
3743
+ attribute: node.attribute,
3744
+ operator: node.operator,
3745
+ quoteMark: "'",
3746
+ value: exportScopedName(node.value, null, null, needExport),
3747
+ });
3748
+ }
3749
+ }
3660
3750
  }
3661
3751
 
3662
3752
  throw new Error(
@@ -3664,7 +3754,7 @@ const plugin = (options = {}) => {
3664
3754
  );
3665
3755
  }
3666
3756
 
3667
- function traverseNode(node) {
3757
+ function traverseNode(node, needExport = true) {
3668
3758
  switch (node.type) {
3669
3759
  case "pseudo":
3670
3760
  if (node.value === ":local") {
@@ -3672,8 +3762,8 @@ const plugin = (options = {}) => {
3672
3762
  throw new Error('Unexpected comma (",") in :local block');
3673
3763
  }
3674
3764
 
3675
- const selector = localizeNode(node.first, node.spaces);
3676
- // move the spaces that were around the psuedo selector to the first
3765
+ const selector = localizeNode(node.first, needExport);
3766
+ // move the spaces that were around the pseudo selector to the first
3677
3767
  // non-container node
3678
3768
  selector.first.spaces = node.spaces;
3679
3769
 
@@ -3695,12 +3785,12 @@ const plugin = (options = {}) => {
3695
3785
  /* falls through */
3696
3786
  case "root":
3697
3787
  case "selector": {
3698
- node.each(traverseNode);
3788
+ node.each((item) => traverseNode(item, needExport));
3699
3789
  break;
3700
3790
  }
3701
3791
  case "id":
3702
3792
  case "class":
3703
- if (exportGlobals) {
3793
+ if (needExport && exportGlobals) {
3704
3794
  exports[node.value] = [node.value];
3705
3795
  }
3706
3796
  break;
@@ -3724,7 +3814,10 @@ const plugin = (options = {}) => {
3724
3814
  rule.selector = traverseNode(parsedSelector.clone()).toString();
3725
3815
 
3726
3816
  rule.walkDecls(/composes|compose-with/i, (decl) => {
3727
- const localNames = getSingleLocalNamesForComposes(parsedSelector);
3817
+ const localNames = getSingleLocalNamesForComposes(
3818
+ parsedSelector,
3819
+ decl.parent
3820
+ );
3728
3821
  const classes = decl.value.split(/\s+/);
3729
3822
 
3730
3823
  classes.forEach((className) => {
@@ -3800,6 +3893,25 @@ const plugin = (options = {}) => {
3800
3893
  atRule.params = exportScopedName(localMatch[1]);
3801
3894
  });
3802
3895
 
3896
+ root.walkAtRules(/scope$/i, (atRule) => {
3897
+ atRule.params = atRule.params
3898
+ .split("to")
3899
+ .map((item) => {
3900
+ const selector = item.trim().slice(1, -1).trim();
3901
+
3902
+ const localMatch = /^\s*:local\s*\((.+?)\)\s*$/.exec(selector);
3903
+
3904
+ if (!localMatch) {
3905
+ return `(${selector})`;
3906
+ }
3907
+
3908
+ let parsedSelector = selectorParser().astSync(selector);
3909
+
3910
+ return `(${traverseNode(parsedSelector, false).toString()})`;
3911
+ })
3912
+ .join(" to ");
3913
+ });
3914
+
3803
3915
  // If we found any :locals, insert an :export rule
3804
3916
  const exportedNames = Object.keys(exports);
3805
3917
 
@@ -4226,6 +4338,8 @@ class Container extends Node {
4226
4338
  normalize(nodes, sample) {
4227
4339
  if (typeof nodes === 'string') {
4228
4340
  nodes = cleanSource(parse(nodes).nodes)
4341
+ } else if (typeof nodes === 'undefined') {
4342
+ nodes = []
4229
4343
  } else if (Array.isArray(nodes)) {
4230
4344
  nodes = nodes.slice(0)
4231
4345
  for (let i of nodes) {
@@ -5639,6 +5753,7 @@ class MapGenerator {
5639
5753
  this.root = root
5640
5754
  this.opts = opts
5641
5755
  this.css = cssString
5756
+ this.originalCSS = cssString
5642
5757
  this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute
5643
5758
 
5644
5759
  this.memoizedFileURLs = new Map()
@@ -5674,7 +5789,7 @@ class MapGenerator {
5674
5789
  if (this.mapOpts.sourcesContent === false) {
5675
5790
  map = new SourceMapConsumer(prev.text)
5676
5791
  if (map.sourcesContent) {
5677
- map.sourcesContent = map.sourcesContent.map(() => null)
5792
+ map.sourcesContent = null
5678
5793
  }
5679
5794
  } else {
5680
5795
  map = prev.consumer()
@@ -5697,7 +5812,7 @@ class MapGenerator {
5697
5812
  }
5698
5813
  }
5699
5814
  } else if (this.css) {
5700
- this.css = this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm, '')
5815
+ this.css = this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm, '')
5701
5816
  }
5702
5817
  }
5703
5818
 
@@ -5899,7 +6014,7 @@ class MapGenerator {
5899
6014
  }
5900
6015
  })
5901
6016
  } else {
5902
- let input = new Input(this.css, this.opts)
6017
+ let input = new Input(this.originalCSS, this.opts)
5903
6018
  if (input.map) this.previousMaps.push(input.map)
5904
6019
  }
5905
6020
  }
@@ -6027,6 +6142,9 @@ class NoWorkResult {
6027
6142
  if (generatedMap) {
6028
6143
  this.result.map = generatedMap
6029
6144
  }
6145
+ } else {
6146
+ map.clearAnnotation()
6147
+ this.result.css = map.css
6030
6148
  }
6031
6149
  }
6032
6150
 
@@ -6600,7 +6718,6 @@ class Parser {
6600
6718
  this.current = this.root
6601
6719
  this.spaces = ''
6602
6720
  this.semicolon = false
6603
- this.customProperty = false
6604
6721
 
6605
6722
  this.createTokenizer()
6606
6723
  this.root.source = { input, start: { column: 1, line: 1, offset: 0 } }
@@ -7456,7 +7573,7 @@ let Root = __nccwpck_require__(9659)
7456
7573
 
7457
7574
  class Processor {
7458
7575
  constructor(plugins = []) {
7459
- this.version = '8.4.32'
7576
+ this.version = '8.4.35'
7460
7577
  this.plugins = this.normalize(plugins)
7461
7578
  }
7462
7579
 
@@ -7492,10 +7609,10 @@ class Processor {
7492
7609
 
7493
7610
  process(css, opts = {}) {
7494
7611
  if (
7495
- this.plugins.length === 0 &&
7496
- typeof opts.parser === 'undefined' &&
7497
- typeof opts.stringifier === 'undefined' &&
7498
- typeof opts.syntax === 'undefined'
7612
+ !this.plugins.length &&
7613
+ !opts.parser &&
7614
+ !opts.stringifier &&
7615
+ !opts.syntax
7499
7616
  ) {
7500
7617
  return new NoWorkResult(this, css, opts)
7501
7618
  } else {
@@ -8510,12 +8627,12 @@ var _options = _interopRequireDefault(__nccwpck_require__(5814));
8510
8627
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8511
8628
  // eslint-disable-next-line consistent-return
8512
8629
  const loader = function loader(content) {
8513
- if (this._compiler && this._compiler.options && this._compiler.options.experiments && this._compiler.options.experiments.css && this._module && this._module.type === "css") {
8630
+ if (this._compiler && this._compiler.options && this._compiler.options.experiments && this._compiler.options.experiments.css && this._module && (this._module.type === "css" || this._module.type === "css/global" || this._module.type === "css/module" || this._module.type === "css/auto")) {
8514
8631
  return content;
8515
8632
  }
8516
8633
  };
8517
8634
  loader.pitch = function pitch(request) {
8518
- if (this._compiler && this._compiler.options && this._compiler.options.experiments && this._compiler.options.experiments.css && this._module && this._module.type === "css") {
8635
+ if (this._compiler && this._compiler.options && this._compiler.options.experiments && this._compiler.options.experiments.css && this._module && (this._module.type === "css" || this._module.type === "css/global" || this._module.type === "css/module" || this._module.type === "css/auto")) {
8519
8636
  this.emitWarning(new Error('You can\'t use `experiments.css` (`experiments.futureDefaults` enable built-in CSS support by default) and `style-loader` together, please set `experiments.css` to `false` or set `{ type: "javascript/auto" }` for rules with `style-loader` in your webpack config (now `style-loader` does nothing).'));
8520
8637
  return;
8521
8638
  }
@@ -8649,8 +8766,7 @@ ${(0, _utils.getExportStyleCode)(esModule, this, request)}
8649
8766
  }
8650
8767
  }
8651
8768
  };
8652
- var _default = loader;
8653
- exports["default"] = _default;
8769
+ var _default = exports["default"] = loader;
8654
8770
 
8655
8771
  /***/ }),
8656
8772
 
@@ -8936,7 +9052,7 @@ function getSetAttributesCode(esModule, loaderContext, options) {
8936
9052
 
8937
9053
  /***/ }),
8938
9054
 
8939
- /***/ 5606:
9055
+ /***/ 3771:
8940
9056
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
8941
9057
 
8942
9058
  module.exports.cssLoader = function() { return __nccwpck_require__(7178); };
@@ -9089,7 +9205,7 @@ module.exports = JSON.parse('{"title":"CSS Loader options","additionalProperties
9089
9205
  /***/ ((module) => {
9090
9206
 
9091
9207
  "use strict";
9092
- module.exports = JSON.parse('{"name":"postcss","version":"8.4.32","description":"Tool for transforming styles with JS plugins","engines":{"node":"^10 || ^12 || >=14"},"exports":{".":{"require":"./lib/postcss.js","import":"./lib/postcss.mjs"},"./lib/at-rule":"./lib/at-rule.js","./lib/comment":"./lib/comment.js","./lib/container":"./lib/container.js","./lib/css-syntax-error":"./lib/css-syntax-error.js","./lib/declaration":"./lib/declaration.js","./lib/fromJSON":"./lib/fromJSON.js","./lib/input":"./lib/input.js","./lib/lazy-result":"./lib/lazy-result.js","./lib/no-work-result":"./lib/no-work-result.js","./lib/list":"./lib/list.js","./lib/map-generator":"./lib/map-generator.js","./lib/node":"./lib/node.js","./lib/parse":"./lib/parse.js","./lib/parser":"./lib/parser.js","./lib/postcss":"./lib/postcss.js","./lib/previous-map":"./lib/previous-map.js","./lib/processor":"./lib/processor.js","./lib/result":"./lib/result.js","./lib/root":"./lib/root.js","./lib/rule":"./lib/rule.js","./lib/stringifier":"./lib/stringifier.js","./lib/stringify":"./lib/stringify.js","./lib/symbols":"./lib/symbols.js","./lib/terminal-highlight":"./lib/terminal-highlight.js","./lib/tokenize":"./lib/tokenize.js","./lib/warn-once":"./lib/warn-once.js","./lib/warning":"./lib/warning.js","./package.json":"./package.json"},"main":"./lib/postcss.js","types":"./lib/postcss.d.ts","keywords":["css","postcss","rework","preprocessor","parser","source map","transform","manipulation","transpiler"],"funding":[{"type":"opencollective","url":"https://opencollective.com/postcss/"},{"type":"tidelift","url":"https://tidelift.com/funding/github/npm/postcss"},{"type":"github","url":"https://github.com/sponsors/ai"}],"author":"Andrey Sitnik <andrey@sitnik.ru>","license":"MIT","homepage":"https://postcss.org/","repository":"postcss/postcss","bugs":{"url":"https://github.com/postcss/postcss/issues"},"dependencies":{"nanoid":"^3.3.7","picocolors":"^1.0.0","source-map-js":"^1.0.2"},"browser":{"./lib/terminal-highlight":false,"source-map-js":false,"path":false,"url":false,"fs":false}}');
9208
+ module.exports = JSON.parse('{"name":"postcss","version":"8.4.35","description":"Tool for transforming styles with JS plugins","engines":{"node":"^10 || ^12 || >=14"},"exports":{".":{"require":"./lib/postcss.js","import":"./lib/postcss.mjs"},"./lib/at-rule":"./lib/at-rule.js","./lib/comment":"./lib/comment.js","./lib/container":"./lib/container.js","./lib/css-syntax-error":"./lib/css-syntax-error.js","./lib/declaration":"./lib/declaration.js","./lib/fromJSON":"./lib/fromJSON.js","./lib/input":"./lib/input.js","./lib/lazy-result":"./lib/lazy-result.js","./lib/no-work-result":"./lib/no-work-result.js","./lib/list":"./lib/list.js","./lib/map-generator":"./lib/map-generator.js","./lib/node":"./lib/node.js","./lib/parse":"./lib/parse.js","./lib/parser":"./lib/parser.js","./lib/postcss":"./lib/postcss.js","./lib/previous-map":"./lib/previous-map.js","./lib/processor":"./lib/processor.js","./lib/result":"./lib/result.js","./lib/root":"./lib/root.js","./lib/rule":"./lib/rule.js","./lib/stringifier":"./lib/stringifier.js","./lib/stringify":"./lib/stringify.js","./lib/symbols":"./lib/symbols.js","./lib/terminal-highlight":"./lib/terminal-highlight.js","./lib/tokenize":"./lib/tokenize.js","./lib/warn-once":"./lib/warn-once.js","./lib/warning":"./lib/warning.js","./package.json":"./package.json"},"main":"./lib/postcss.js","types":"./lib/postcss.d.ts","keywords":["css","postcss","rework","preprocessor","parser","source map","transform","manipulation","transpiler"],"funding":[{"type":"opencollective","url":"https://opencollective.com/postcss/"},{"type":"tidelift","url":"https://tidelift.com/funding/github/npm/postcss"},{"type":"github","url":"https://github.com/sponsors/ai"}],"author":"Andrey Sitnik <andrey@sitnik.ru>","license":"MIT","homepage":"https://postcss.org/","repository":"postcss/postcss","bugs":{"url":"https://github.com/postcss/postcss/issues"},"dependencies":{"nanoid":"^3.3.7","picocolors":"^1.0.0","source-map-js":"^1.0.2"},"browser":{"./lib/terminal-highlight":false,"source-map-js":false,"path":false,"url":false,"fs":false}}');
9093
9209
 
9094
9210
  /***/ }),
9095
9211
 
@@ -9143,7 +9259,7 @@ module.exports = JSON.parse('{"title":"Style Loader options","type":"object","pr
9143
9259
  /******/ // startup
9144
9260
  /******/ // Load entry module and return exports
9145
9261
  /******/ // This entry module used 'module' so it can't be inlined
9146
- /******/ var __webpack_exports__ = __nccwpck_require__(5606);
9262
+ /******/ var __webpack_exports__ = __nccwpck_require__(3771);
9147
9263
  /******/ module.exports = __webpack_exports__;
9148
9264
  /******/
9149
9265
  /******/ })()