@flatjs/evolve 1.8.1-next.55 → 1.8.1-next.57
Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# @flatjs/evolve
|
2
2
|
|
3
|
+
## 1.8.1-next.57
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 12f0600: Setup `config:false` for `postcss-loader` to improve performance
|
8
|
+
|
9
|
+
## 1.8.1-next.56
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- 08499ec: Allow pass customized options of `postcss-loader`
|
14
|
+
- 87013ff: bump version
|
15
|
+
- Updated dependencies [87013ff]
|
16
|
+
- @flatjs/forge-postcss-plugin-pixel@1.8.1-next.26
|
17
|
+
- @flatjs/evolve-preset-babel@1.8.1-next.12
|
18
|
+
- @flatjs/common@1.8.1-next.26
|
19
|
+
- @flatjs/graph@1.8.1-next.30
|
20
|
+
- @flatjs/mock@1.8.1-next.48
|
21
|
+
|
3
22
|
## 1.8.1-next.55
|
4
23
|
|
5
24
|
### 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
|
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};
|
package/dist/default-options.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const defaultEvolveOptions={projectCwd:process.cwd(),projectVirtualPath:"flatjs/evolve",rejectWarnings:!1,devServer:{autoOpen:!0,mockOptions:{mockBaseDir:"mocks"},clientOverlay:{errors:!0,warnings:!1},middlewares:[],watchOptions:{poll:1e3,ignored:/node_modules/,aggregateTimeout:500},defaultServeGlobalData:()=>Promise.resolve({})},webpack:{target:["web","es5"],plugins:[],ruleSets:[],publicPath:"auto",externals:{vue:"Vue",react:"React","react-dom":"ReactDOM"},outputDir:"public",enableBundleHashName:!0},pluginOptions:{},loaderOptions:{assetDataUrlMaxSize:4096,babelOptions:{usePreset:"react",plugins:[],presets:[]},runTsChecker:!0,lessOptions:{},cssnanoOptions:{},pixelOptions:{rootValue:{px:100,rpx:1},outputUnit:"rem"},modularImports:[]},entryMap:{},multiHtmlCdn:{},multiHtmlCdnEnvResolver:function cdnResolver(){},needVerifyPackages:{},packageInstallChecker:{enabled:!1,detectModules:["@dimjs/*"],throwError:!1,showAllInstalledGraph:!0},maxProcesses:"50%",ci:{basedBranch:"master"}};
|
1
|
+
export const defaultEvolveOptions={projectCwd:process.cwd(),projectVirtualPath:"flatjs/evolve",rejectWarnings:!1,devServer:{autoOpen:!0,mockOptions:{mockBaseDir:"mocks"},clientOverlay:{errors:!0,warnings:!1},middlewares:[],watchOptions:{poll:1e3,ignored:/node_modules/,aggregateTimeout:500},defaultServeGlobalData:()=>Promise.resolve({})},webpack:{target:["web","es5"],plugins:[],ruleSets:[],publicPath:"auto",externals:{vue:"Vue",react:"React","react-dom":"ReactDOM"},outputDir:"public",enableBundleHashName:!0},pluginOptions:{},loaderOptions:{assetDataUrlMaxSize:4096,babelOptions:{usePreset:"react",plugins:[],presets:[]},runTsChecker:!0,lessOptions:{},postcssOptions:{cssnanoOptions:{}},pixelOptions:{rootValue:{px:100,rpx:1},outputUnit:"rem"},modularImports:[]},entryMap:{},multiHtmlCdn:{},multiHtmlCdnEnvResolver:function cdnResolver(){},needVerifyPackages:{},packageInstallChecker:{enabled:!1,detectModules:["@dimjs/*"],throwError:!1,showAllInstalledGraph:!0},maxProcesses:"50%",ci:{basedBranch:"master"}};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { type TransformOptions } from '@babel/core';
|
2
2
|
import { type PostcssPluginPixelOptions } from '@flatjs/forge-postcss-plugin-pixel';
|
3
3
|
import { type Options } from 'cssnano';
|
4
|
+
import { type AcceptedPlugin } from 'postcss';
|
4
5
|
import { type ModularImportOption } from './types-modular-import.js';
|
5
6
|
export type BabelInputOptions = Pick<TransformOptions, 'presets' | 'plugins'>;
|
6
7
|
/**
|
@@ -40,15 +41,25 @@ export interface RuleSetLoaderOptions {
|
|
40
41
|
*/
|
41
42
|
runTsChecker?: boolean;
|
42
43
|
/**
|
43
|
-
* The
|
44
|
-
* sometimes we need to disabled some rules for `default cssnano preset`
|
45
|
-
* @example
|
46
|
-
* disable `postcss-minify-font-values` rule to avoid transitions from `font-weight:bold` to `font-weight:700`
|
47
|
-
* ```json
|
48
|
-
* cssnanoOptions: { minifyFontValues: false }
|
49
|
-
* ```
|
44
|
+
* The configration options of `postcss-loader`
|
50
45
|
*/
|
51
|
-
|
46
|
+
postcssOptions?: {
|
47
|
+
/**
|
48
|
+
* The overrided configurations of `cssnano-preset-default`
|
49
|
+
* sometimes we need to disabled some rules for `default cssnano preset`
|
50
|
+
* @example
|
51
|
+
* disable `postcss-minify-font-values` rule to avoid transitions from `font-weight:bold` to `font-weight:700`
|
52
|
+
* ```json
|
53
|
+
* cssnanoOptions: { minifyFontValues: false }
|
54
|
+
* ```
|
55
|
+
*/
|
56
|
+
cssnanoOptions?: Options;
|
57
|
+
/**
|
58
|
+
* Allow to extends extra plugins of `postcss-loader`
|
59
|
+
* @example `['tailwindcss', {}]`
|
60
|
+
*/
|
61
|
+
plugins?: Array<AcceptedPlugin | string | [string, Record<string, unknown>]>;
|
62
|
+
};
|
52
63
|
/**
|
53
64
|
* The babel options for `babel-loader`
|
54
65
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@flatjs/evolve",
|
3
|
-
"version": "1.8.1-next.
|
3
|
+
"version": "1.8.1-next.57",
|
4
4
|
"license": "MIT",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
@@ -37,15 +37,15 @@
|
|
37
37
|
"typecheck": "tsc --project ./tsconfig.json --noEmit"
|
38
38
|
},
|
39
39
|
"dependencies": {
|
40
|
-
"@armit/file-utility": "^0.0.
|
41
|
-
"@armit/git": "^0.0.
|
42
|
-
"@armit/package": "^0.0.
|
40
|
+
"@armit/file-utility": "^0.0.25",
|
41
|
+
"@armit/git": "^0.0.29",
|
42
|
+
"@armit/package": "^0.0.40",
|
43
43
|
"@babel/core": "7.22.1",
|
44
|
-
"@flatjs/common": "1.8.1-next.
|
45
|
-
"@flatjs/evolve-preset-babel": "1.8.1-next.
|
46
|
-
"@flatjs/forge-postcss-plugin-pixel": "1.8.1-next.
|
47
|
-
"@flatjs/graph": "1.8.1-next.
|
48
|
-
"@flatjs/mock": "1.8.1-next.
|
44
|
+
"@flatjs/common": "1.8.1-next.26",
|
45
|
+
"@flatjs/evolve-preset-babel": "1.8.1-next.12",
|
46
|
+
"@flatjs/forge-postcss-plugin-pixel": "1.8.1-next.26",
|
47
|
+
"@flatjs/graph": "1.8.1-next.30",
|
48
|
+
"@flatjs/mock": "1.8.1-next.48",
|
49
49
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
|
50
50
|
"@types/babel__core": "7.20.1",
|
51
51
|
"babel-loader": "9.1.2",
|
@@ -72,20 +72,20 @@
|
|
72
72
|
"terser-webpack-plugin": "5.3.9",
|
73
73
|
"tsconfig-paths-webpack-plugin": "4.0.1",
|
74
74
|
"type-fest": "^3.11.1",
|
75
|
-
"webpack": "5.
|
75
|
+
"webpack": "5.86.0",
|
76
76
|
"webpack-bundle-analyzer": "4.9.0",
|
77
77
|
"webpack-dev-server": "4.15.0",
|
78
78
|
"webpack-sources": "3.2.3"
|
79
79
|
},
|
80
80
|
"devDependencies": {
|
81
|
-
"@armit/eslint-config-bases": "^0.0.
|
82
|
-
"@flatjs/testing": "1.8.1-next.
|
83
|
-
"@swc/core": "1.3.
|
81
|
+
"@armit/eslint-config-bases": "^0.0.20",
|
82
|
+
"@flatjs/testing": "1.8.1-next.27",
|
83
|
+
"@swc/core": "1.3.62",
|
84
84
|
"@types/express": "4.17.17",
|
85
85
|
"@types/node": "20.2.5",
|
86
|
-
"@vitest/coverage-istanbul": "0.
|
87
|
-
"@vitest/ui": "0.
|
88
|
-
"eslint": "8.
|
86
|
+
"@vitest/coverage-istanbul": "0.32.0",
|
87
|
+
"@vitest/ui": "0.32.0",
|
88
|
+
"eslint": "8.42.0",
|
89
89
|
"imagemin-gifsicle": "7.0.0",
|
90
90
|
"imagemin-jpegtran": "7.0.0",
|
91
91
|
"imagemin-pngquant": "9.0.2",
|
@@ -97,7 +97,7 @@
|
|
97
97
|
"swc-unplugin-ts": "1.0.2",
|
98
98
|
"ts-node": "10.9.1",
|
99
99
|
"vite-tsconfig-paths": "4.2.0",
|
100
|
-
"vitest": "0.
|
100
|
+
"vitest": "0.32.0",
|
101
101
|
"vue-loader": "17.2.2"
|
102
102
|
},
|
103
103
|
"peerDependencies": {
|