@flatjs/evolve 1.8.1-next.71 → 1.8.1-next.72
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
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",
|