@flatjs/evolve 1.8.1-next.75 → 1.8.1-next.77
Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
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
|
+
|
9
|
+
## 1.8.1-next.76
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- 6fc5653: Add mockFilters for `evolve` allow defined filter for each served entries
|
14
|
+
- Updated dependencies [f9e23c8]
|
15
|
+
- @flatjs/mock@1.8.1-next.62
|
16
|
+
|
3
17
|
## 1.8.1-next.75
|
4
18
|
|
5
19
|
### 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
|
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};
|
@@ -1 +1 @@
|
|
1
|
-
import{urlJoin}from"@flatjs/common";import{attachMockMiddlewares}from"@flatjs/mock";import{createAppPageRoute,createDevServer,createDevServerCompilerTasks,createDevServerEntries}from"../dev-server/index.js";import{openPage}from"../helpers/index.js";import{envVerify}from"./env-verify.js";export const prepareServe=async(e,r,t)=>{await envVerify(e,t);const{app:
|
1
|
+
import{arrayUnique,urlJoin}from"@flatjs/common";import{attachMockMiddlewares}from"@flatjs/mock";import{createAppPageRoute,createDevServer,createDevServerCompilerTasks,createDevServerEntries}from"../dev-server/index.js";import{openPage}from"../helpers/index.js";import{envVerify}from"./env-verify.js";export const prepareServe=async(e,r,t)=>{await envVerify(e,t);const{app:o,devPort:a,devHostUri:i}=await createDevServer(t),s=t.devServer?.mockOptions?.mockFilters||[];for(const[,e]of Object.entries(r))s.push(...e.options?.mockFilters||[]);await attachMockMiddlewares(o,{...t.devServer?.mockOptions,mockFilters:arrayUnique(s),projectCwd:e});const c=await createDevServerEntries(a,r,t);createAppPageRoute(e,o,i,c,t);const n=urlJoin(i,["/pages"]);t.devServer?.autoOpen&&openPage(n);const v=await createDevServerCompilerTasks(e,n,c,t);return Promise.all(v).then((()=>o))};
|
@@ -52,6 +52,11 @@ export interface EvolveEntryItemOption extends MultiHtmlCDNEntryItem {
|
|
52
52
|
* @default false
|
53
53
|
*/
|
54
54
|
useRelativeAssetPath?: boolean;
|
55
|
+
/**
|
56
|
+
* The filter will try filter which mock defs files will be loaded for this `entryItem` while `serve`.
|
57
|
+
* @default undefined
|
58
|
+
*/
|
59
|
+
mockFilters?: Array<string | RegExp>;
|
55
60
|
}
|
56
61
|
export type EvolveEntryMapContent = {
|
57
62
|
entry: [string, ...string[]];
|
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.77",
|
4
4
|
"license": "MIT",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
@@ -46,7 +46,7 @@
|
|
46
46
|
"@flatjs/evolve-preset-babel": "1.8.1-next.15",
|
47
47
|
"@flatjs/forge-postcss-plugin-pixel": "1.8.1-next.30",
|
48
48
|
"@flatjs/graph": "1.8.1-next.38",
|
49
|
-
"@flatjs/mock": "1.8.1-next.
|
49
|
+
"@flatjs/mock": "1.8.1-next.62",
|
50
50
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
|
51
51
|
"@types/babel__core": "7.20.1",
|
52
52
|
"babel-loader": "9.1.2",
|