@flatjs/evolve 1.8.1-next.76 → 1.8.1-next.77

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @flatjs/evolve
2
2
 
3
+ ## 1.8.1-next.77
4
+
5
+ ### Patch Changes
6
+
7
+ - 44752f5: Allow pass configuration for `css-loader`
8
+
3
9
  ## 1.8.1-next.76
4
10
 
5
11
  ### Patch Changes
@@ -1 +1 @@
1
- import{forgePostcssPluginPixel}from"@flatjs/forge-postcss-plugin-pixel";import cssnano from"cssnano";import MiniCssExtractPlugin from"mini-css-extract-plugin";import{allowPx2remForModule}from"../../helpers/allow-px2rem-for-module.js";const getPostcssOptions=(s,o={},e={})=>{const t=[...e.plugins||[],cssnano({preset:["default",{discardComments:{removeAll:!s},reduceInitial:!1,normalizeWhitespace:!s,...e.cssnanoOptions}]})];return!1!==o&&t.push(forgePostcssPluginPixel(o)),{plugins:t}};export const ruleCss=(s,o,e)=>{const t={test:/\.css$/i,use:[{loader:MiniCssExtractPlugin.loader,options:{esModule:!0}},{loader:"css-loader",options:{sourceMap:s}}]},{pixelOptions:r,postcssOptions:i}=e.loaderOptions,n=allowPx2remForModule(o,e);if(Array.isArray(t.use)){const o=getPostcssOptions(s,!!n&&r,i);t.use.push({loader:"postcss-loader",options:{postcssOptions:{...o,config:!1},sourceMap:s}})}return t};
1
+ import{forgePostcssPluginPixel}from"@flatjs/forge-postcss-plugin-pixel";import cssnano from"cssnano";import MiniCssExtractPlugin from"mini-css-extract-plugin";import{allowPx2remForModule}from"../../helpers/allow-px2rem-for-module.js";const getPostcssOptions=(s,o={},e={})=>{const t=[...e.plugins||[],cssnano({preset:["default",{discardComments:{removeAll:!s},reduceInitial:!1,normalizeWhitespace:!s,...e.cssnanoOptions}]})];return!1!==o&&t.push(forgePostcssPluginPixel(o)),{plugins:t}};export const ruleCss=(s,o,e)=>{const{pixelOptions:t,cssLoaderOptions:r,postcssOptions:i}=e.loaderOptions,n={test:/\.css$/i,use:[{loader:MiniCssExtractPlugin.loader,options:{esModule:!0}},{loader:"css-loader",options:{sourceMap:s,...r}}]},l=allowPx2remForModule(o,e);if(Array.isArray(n.use)){const o=getPostcssOptions(s,!!l&&t,i);n.use.push({loader:"postcss-loader",options:{postcssOptions:{...o,config:!1},sourceMap:s}})}return n};
@@ -25,6 +25,10 @@ export interface RuleSetLoaderOptions {
25
25
  * @default `4 * 1024` (4KB)
26
26
  */
27
27
  assetDataUrlMaxSize?: number;
28
+ /**
29
+ * The configurations of `css-loader`
30
+ */
31
+ cssLoaderOptions?: Record<string, unknown>;
28
32
  /**
29
33
  * The config for `Less`
30
34
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatjs/evolve",
3
- "version": "1.8.1-next.76",
3
+ "version": "1.8.1-next.77",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {