@flatjs/evolve 1.8.1-next.70 → 1.8.1-next.72
Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# @flatjs/evolve
|
2
2
|
|
3
|
+
## 1.8.1-next.72
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 2a6e5c4: improved `mock` add it to `watcherOption` ignore list
|
8
|
+
- Updated dependencies [2a6e5c4]
|
9
|
+
- @flatjs/mock@1.8.1-next.59
|
10
|
+
|
11
|
+
## 1.8.1-next.71
|
12
|
+
|
13
|
+
### Patch Changes
|
14
|
+
|
15
|
+
- Updated dependencies [0c3afab]
|
16
|
+
- @flatjs/mock@1.8.1-next.58
|
17
|
+
|
3
18
|
## 1.8.1-next.70
|
4
19
|
|
5
20
|
### Patch Changes
|
package/dist/default-options.js
CHANGED
@@ -14,7 +14,8 @@ export const defaultEvolveOptions = {
|
|
14
14
|
middlewares: [],
|
15
15
|
watchOptions: {
|
16
16
|
poll: 1000,
|
17
|
-
|
17
|
+
// Use array here, easy can add a new ignore dynamic at runtime.
|
18
|
+
ignored: ['**/node_modules', '**/mocks'],
|
18
19
|
aggregateTimeout: 500,
|
19
20
|
},
|
20
21
|
defaultServeGlobalData: () => Promise.resolve({}),
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { loadMockConfig } from '@flatjs/mock';
|
1
|
+
import { loadMockConfig, getMockCwd } from '@flatjs/mock';
|
2
2
|
import _ from 'lodash';
|
3
3
|
export const refreshEvolveMockOptions = async (projectCwd, evolveOptions, configLoaderOptions) => {
|
4
4
|
const devServer = evolveOptions.devServer;
|
@@ -18,6 +18,12 @@ export const refreshEvolveMockOptions = async (projectCwd, evolveOptions, config
|
|
18
18
|
if (devServer.mockOptions && !devServer.mockOptions.https) {
|
19
19
|
devServer.mockOptions.https = devServer?.https;
|
20
20
|
}
|
21
|
+
// Dynamic resolve mock work root directory
|
22
|
+
const mockCwd = getMockCwd(newMockOptions);
|
23
|
+
// always push mockCwd into watchOptions ignored.
|
24
|
+
if (Array.isArray(devServer?.watchOptions?.ignored)) {
|
25
|
+
devServer?.watchOptions?.ignored.push(mockCwd);
|
26
|
+
}
|
21
27
|
}
|
22
28
|
return evolveOptions;
|
23
29
|
};
|
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.72",
|
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.36",
|
49
|
-
"@flatjs/mock": "1.8.1-next.
|
49
|
+
"@flatjs/mock": "1.8.1-next.59",
|
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",
|