@flatjs/evolve 2.1.0-next.9 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/compiler/create-global-compiler.d.ts +2 -0
- package/dist/compiler/create-global-compiler.js +1 -0
- package/dist/constants.d.ts +9 -0
- package/dist/constants.js +1 -1
- package/dist/create-webpack/create-externals.d.ts +1 -1
- package/dist/create-webpack/create-externals.js +1 -1
- package/dist/create-webpack/create-optimization.d.ts +1 -1
- package/dist/create-webpack/create-optimization.js +1 -1
- package/dist/create-webpack/create-output.d.ts +1 -1
- package/dist/create-webpack/create-performance.d.ts +1 -1
- package/dist/create-webpack/create-plugins.d.ts +2 -1
- package/dist/create-webpack/create-plugins.js +1 -1
- package/dist/create-webpack/create-resolve.js +1 -1
- package/dist/create-webpack/create-rule-sets.d.ts +1 -1
- package/dist/create-webpack/create-rule-sets.js +1 -1
- package/dist/create-webpack/load-watch-options.d.ts +12 -0
- package/dist/create-webpack/load-watch-options.js +1 -0
- package/dist/create-webpack/load-webpack-config.d.ts +2 -1
- package/dist/create-webpack/load-webpack-config.js +1 -1
- package/dist/create-webpack/rule-sets/rule-assets.d.ts +2 -2
- package/dist/create-webpack/rule-sets/rule-assets.js +1 -1
- package/dist/create-webpack/rule-sets/rule-css.js +1 -1
- package/dist/create-webpack/rule-sets/rule-scripts.d.ts +2 -0
- package/dist/create-webpack/rule-sets/rule-scripts.js +1 -1
- package/dist/create-webpack/types.d.ts +1 -1
- package/dist/default-options.js +1 -1
- package/dist/define-config/define-config.d.ts +2 -2
- package/dist/dev-server/add-compiler-to-dev-server.js +1 -1
- package/dist/dev-server/create-dev-server-compiler-task.d.ts +3 -0
- package/dist/dev-server/create-dev-server-compiler-task.js +1 -0
- package/dist/dev-server/create-dev-server-entries.d.ts +1 -1
- package/dist/dev-server/create-dev-server-entries.js +1 -1
- package/dist/dev-server/create-dev-server.js +1 -1
- package/dist/dev-server/index.d.ts +3 -3
- package/dist/dev-server/index.js +1 -1
- package/dist/dev-server/middlewares/get-bundle-asset.d.ts +1 -1
- package/dist/dev-server/middlewares/get-page-main-html.js +1 -1
- package/dist/dev-server/middlewares/get-page-module-html.js +1 -1
- package/dist/helpers/assert-group-entry-item.d.ts +7 -0
- package/dist/helpers/assert-group-entry-item.js +1 -0
- package/dist/helpers/assert-single-compiler.d.ts +15 -0
- package/dist/helpers/assert-single-compiler.js +1 -0
- package/dist/helpers/check-runtime-env.d.ts +4 -0
- package/dist/helpers/check-runtime-env.js +1 -0
- package/dist/helpers/custom-listr-renderer.d.ts +41 -0
- package/dist/helpers/custom-listr-renderer.js +1 -0
- package/dist/helpers/custom-message-channel.d.ts +17 -0
- package/dist/helpers/custom-message-channel.js +1 -0
- package/dist/helpers/delete-object-keys.d.ts +11 -0
- package/dist/helpers/delete-object-keys.js +1 -0
- package/dist/helpers/flat-entry-map.d.ts +8 -0
- package/dist/helpers/flat-entry-map.js +1 -0
- package/dist/helpers/format-spinner-text.d.ts +8 -0
- package/dist/helpers/format-spinner-text.js +1 -0
- package/dist/helpers/get-bundle-file-name.d.ts +1 -1
- package/dist/helpers/get-runtime-cdn-base.d.ts +2 -0
- package/dist/helpers/get-runtime-cdn-base.js +1 -0
- package/dist/helpers/get-stats-file-name.d.ts +2 -0
- package/dist/helpers/get-stats-file-name.js +1 -0
- package/dist/helpers/index.d.ts +18 -4
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/is-deep-equal.d.ts +9 -0
- package/dist/helpers/is-deep-equal.js +1 -0
- package/dist/helpers/json-serializer.js +1 -1
- package/dist/helpers/merge-babel-options.d.ts +1 -1
- package/dist/helpers/merge-babel-options.js +1 -1
- package/dist/helpers/normalize-check-entry-options.d.ts +10 -0
- package/dist/helpers/normalize-check-entry-options.js +1 -0
- package/dist/helpers/normalize-entry-map.d.ts +1 -0
- package/dist/helpers/normalize-entry-map.js +1 -1
- package/dist/helpers/normalize-entry-module-absolute-path.d.ts +10 -0
- package/dist/helpers/normalize-entry-module-absolute-path.js +1 -0
- package/dist/helpers/normalize-group-name.d.ts +8 -0
- package/dist/helpers/normalize-group-name.js +1 -0
- package/dist/helpers/normalize-template-inject-tokens.d.ts +16 -0
- package/dist/helpers/normalize-template-inject-tokens.js +1 -0
- package/dist/helpers/open-page.js +1 -1
- package/dist/helpers/refresh-evolve-mock-options.js +1 -1
- package/dist/helpers/script-injects.d.ts +1 -1
- package/dist/helpers/split-to-entry-group.d.ts +52 -0
- package/dist/helpers/split-to-entry-group.js +1 -0
- package/dist/helpers/verify-group-entry-options.d.ts +9 -0
- package/dist/helpers/verify-group-entry-options.js +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/load-config/load-evolve-config.js +1 -1
- package/dist/loaders/loader-icon.cjs +2 -1
- package/dist/main/create-thread-worker.d.ts +29 -14
- package/dist/main/create-thread-worker.js +1 -1
- package/dist/main/index.d.ts +1 -1
- package/dist/main/index.js +1 -1
- package/dist/main/prepare-analyzer.d.ts +9 -0
- package/dist/main/prepare-analyzer.js +1 -0
- package/dist/main/prepare-build.d.ts +4 -3
- package/dist/main/prepare-build.js +1 -1
- package/dist/main/prepare-serve.d.ts +1 -1
- package/dist/main/prepare-serve.js +1 -1
- package/dist/main/start-analyzer.d.ts +10 -0
- package/dist/main/start-analyzer.js +1 -0
- package/dist/main/start-build-dynamic.d.ts +2 -2
- package/dist/main/start-build-dynamic.js +1 -1
- package/dist/main/start-build-worker.d.ts +17 -6
- package/dist/main/start-build-worker.js +1 -1
- package/dist/main/start-build.d.ts +3 -2
- package/dist/main/start-build.js +1 -1
- package/dist/main/start-group-entry-build.d.ts +15 -0
- package/dist/main/start-group-entry-build.js +1 -0
- package/dist/main/start-serve.d.ts +1 -1
- package/dist/main/start-serve.js +1 -1
- package/dist/minimizer/create-minimizers.js +1 -1
- package/dist/minimizer/image-minimizer.js +1 -1
- package/dist/minimizer/terser-minimizer.js +1 -1
- package/dist/plugins/circular-dependency/circular-dependency-plugin.js +1 -1
- package/dist/plugins/clean-webpack/index.d.ts +1 -1
- package/dist/plugins/clean-webpack/index.js +1 -1
- package/dist/plugins/define-variable/define-variable-plugin.js +1 -1
- package/dist/plugins/module-federation/module-federation.d.ts +1 -1
- package/dist/plugins/module-federation/module-federation.js +1 -1
- package/dist/plugins/multi-html/index.d.ts +1 -1
- package/dist/plugins/multi-html/index.js +1 -1
- package/dist/plugins/multi-html/multi-html-cdn-plugin.js +1 -1
- package/dist/plugins/multi-html/multi-html-plugin.d.ts +1 -1
- package/dist/plugins/multi-html/multi-html-plugin.js +1 -1
- package/dist/plugins/stats-webpack/helper-write-stats.d.ts +28 -0
- package/dist/plugins/stats-webpack/helper-write-stats.js +1 -0
- package/dist/plugins/stats-webpack/index.d.ts +12 -0
- package/dist/plugins/stats-webpack/index.js +1 -0
- package/dist/plugins/stats-webpack/stats-webpack-plugin.d.ts +25 -0
- package/dist/plugins/stats-webpack/stats-webpack-plugin.js +1 -0
- package/dist/plugins/ts-checker/ts-checker-guard-plugin.d.ts +13 -0
- package/dist/plugins/ts-checker/ts-checker-guard-plugin.js +1 -0
- package/dist/plugins/ts-checker/ts-checker-plugin.d.ts +1 -2
- package/dist/plugins/ts-checker/ts-checker-plugin.js +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.js +1 -1
- package/dist/types/types-analyzer.d.ts +70 -0
- package/dist/types/types-analyzer.js +1 -0
- package/dist/types/types-cli-options.d.ts +12 -0
- package/dist/types/types-cli-options.js +1 -0
- package/dist/types/types-dev-server.d.ts +17 -6
- package/dist/types/types-entry-map.d.ts +19 -1
- package/dist/types/types-global-compiler-options.d.ts +7 -0
- package/dist/types/types-global-compiler-options.js +1 -0
- package/dist/types/types-loader-options.d.ts +31 -9
- package/dist/types/types-options.d.ts +30 -15
- package/dist/types/types-threads-options.d.ts +18 -0
- package/dist/types/types-threads-options.js +1 -0
- package/dist/types/types-webpack.d.ts +5 -2
- package/package.json +66 -64
- package/templates/html-plugin/index-ntv.html +61 -0
- package/dist/dev-server/create-dev-server-compiler-tasks.d.ts +0 -3
- package/dist/dev-server/create-dev-server-compiler-tasks.js +0 -1
- package/dist/helpers/assert-only-single-entry-item.d.ts +0 -7
- package/dist/helpers/assert-only-single-entry-item.js +0 -1
- package/dist/helpers/split-to-multi-compiler.d.ts +0 -8
- package/dist/helpers/split-to-multi-compiler.js +0 -1
- package/dist/main/start-one-entry-build.d.ts +0 -13
- package/dist/main/start-one-entry-build.js +0 -1
- package/dist/plugins/ts-checker/index.d.ts +0 -1
- package/dist/plugins/ts-checker/index.js +0 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@flatjs/evolve",
|
3
|
-
"version": "2.1.0
|
3
|
+
"version": "2.1.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
@@ -18,90 +18,92 @@
|
|
18
18
|
"./templates"
|
19
19
|
],
|
20
20
|
"scripts": {
|
21
|
-
"serve": "yarn node --import=@
|
21
|
+
"serve": "yarn node --import=@hyperse/ts-node-paths/register ./tests/dev-server/dev-server.ts",
|
22
|
+
"analyzer": "yarn node --import=@hyperse/ts-node-paths/register ./tests/build-analyzer/start-analyzer.ts",
|
22
23
|
"build": "rimraf dist && tsc -p ./tsconfig.build.json && npm run minify",
|
23
24
|
"?build-release": "When https://github.com/atlassian/changesets/issues/432 has a solution we can remove this trick",
|
24
25
|
"build-release": "yarn build && rimraf ./_release && yarn pack && mkdir ./_release && tar zxvf ./package.tgz --directory ./_release && rm ./package.tgz",
|
25
26
|
"minify": "node ../../scripts/minify.mjs --dest=dist",
|
26
27
|
"codegen": "graphql-codegen --config ./codegen.cjs",
|
27
28
|
"clean": "rimraf --no-glob ./dist ./coverage ./__data__ ./config/__data__ ./_release ./tsconfig.tsbuildinfo",
|
28
|
-
"lint": "eslint . --
|
29
|
+
"lint": "eslint . --cache --cache-location ../../.cache/eslint/evolve.eslintcache",
|
29
30
|
"test": "run-s test-unit",
|
30
31
|
"test-task": "vitest run",
|
31
32
|
"test-unit": "vitest run --passWithNoTests",
|
32
33
|
"test-watch": "vitest watch --ui",
|
33
|
-
"fix-all-files": "eslint . --
|
34
|
+
"fix-all-files": "eslint . --fix",
|
34
35
|
"typecheck": "tsc --project ./tsconfig.json --noEmit"
|
35
36
|
},
|
36
37
|
"dependencies": {
|
37
|
-
"@armit/babel-merge": "^0.
|
38
|
-
"@armit/config-loader": "^0.
|
39
|
-
"@armit/file-utility": "^0.
|
40
|
-
"@armit/git": "^0.
|
41
|
-
"@armit/package": "^0.
|
42
|
-
"@
|
43
|
-
"@
|
44
|
-
"@
|
45
|
-
"@flatjs/
|
46
|
-
"@flatjs/
|
47
|
-
"@flatjs/
|
48
|
-
"@flatjs/
|
49
|
-
"@flatjs/
|
50
|
-
"@
|
51
|
-
"@
|
52
|
-
"
|
53
|
-
"
|
54
|
-
"
|
55
|
-
"
|
56
|
-
"
|
57
|
-
"
|
58
|
-
"
|
59
|
-
"
|
60
|
-
"
|
61
|
-
"
|
62
|
-
"
|
63
|
-
"
|
64
|
-
"
|
65
|
-
"
|
66
|
-
"
|
67
|
-
"
|
68
|
-
"
|
69
|
-
"
|
70
|
-
"
|
71
|
-
"
|
72
|
-
"
|
73
|
-
"
|
74
|
-
"
|
75
|
-
"
|
76
|
-
"
|
77
|
-
"webpack-
|
78
|
-
"
|
79
|
-
"
|
38
|
+
"@armit/babel-merge": "^0.2.4",
|
39
|
+
"@armit/config-loader": "^0.2.7",
|
40
|
+
"@armit/file-utility": "^0.2.4",
|
41
|
+
"@armit/git": "^0.2.4",
|
42
|
+
"@armit/package": "^0.2.7",
|
43
|
+
"@babel/core": "^7.24.9",
|
44
|
+
"@clack/prompts": "^0.7.0",
|
45
|
+
"@discoveryjs/json-ext": "0.6.0",
|
46
|
+
"@flatjs/babel-plugin-import": "2.1.0",
|
47
|
+
"@flatjs/common": "2.1.0",
|
48
|
+
"@flatjs/evolve-preset-babel": "2.1.0",
|
49
|
+
"@flatjs/forge-postcss-plugin-pixel": "2.1.0",
|
50
|
+
"@flatjs/graph": "2.1.0",
|
51
|
+
"@flatjs/mock": "2.1.0",
|
52
|
+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
|
53
|
+
"@types/babel__core": "^7.20.5",
|
54
|
+
"babel-loader": "^9.1.3",
|
55
|
+
"better-opn": "^3.0.2",
|
56
|
+
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
57
|
+
"ci-info": "^4.0.0",
|
58
|
+
"css-loader": "^7.1.2",
|
59
|
+
"cssnano": "^7.0.4",
|
60
|
+
"express": "^4.19.2",
|
61
|
+
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
62
|
+
"happy-dom": "^14.12.3",
|
63
|
+
"html-webpack-plugin": "^5.6.0",
|
64
|
+
"image-minimizer-webpack-plugin": "^4.0.2",
|
65
|
+
"less": "^4.2.0",
|
66
|
+
"less-loader": "^12.2.0",
|
67
|
+
"listr": "^0.14.3",
|
68
|
+
"lodash": "^4.17.21",
|
69
|
+
"log-update": "^6.0.0",
|
70
|
+
"mini-css-extract-plugin": "^2.9.0",
|
71
|
+
"postcss": "^8.4.39",
|
72
|
+
"postcss-loader": "^8.1.1",
|
73
|
+
"react-refresh": "^0.14.2",
|
74
|
+
"svgo": "^3.3.2",
|
75
|
+
"tarjan-graph": "^3.0.0",
|
76
|
+
"terser-webpack-plugin": "^5.3.10",
|
77
|
+
"tinypool": "^1.0.0",
|
78
|
+
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
79
|
+
"type-fest": "^4.23.0",
|
80
|
+
"typescript": "^5.5.4",
|
81
|
+
"webpack": "^5.93.0",
|
82
|
+
"webpack-bundle-analyzer": "^4.10.2",
|
83
|
+
"webpack-dev-server": "^5.0.4",
|
84
|
+
"webpack-sources": "^3.2.3"
|
80
85
|
},
|
81
86
|
"devDependencies": {
|
82
|
-
"@
|
83
|
-
"@dimjs/model
|
84
|
-
"@
|
85
|
-
"@
|
87
|
+
"@dimjs/lang": "2.0.0",
|
88
|
+
"@dimjs/model": "2.0.0",
|
89
|
+
"@dimjs/model-react": "2.0.0",
|
90
|
+
"@dimjs/utils": "2.0.0",
|
91
|
+
"@flatjs/testing": "2.1.0",
|
92
|
+
"@hyperse/eslint-config-hyperse": "^1.0.10",
|
93
|
+
"@swc/core": "1.7.1",
|
86
94
|
"@types/express": "4.17.21",
|
87
95
|
"@types/listr": "0.14.9",
|
88
|
-
"@types/node": "20.12
|
89
|
-
"
|
90
|
-
"@vitest/ui": "1.4.0",
|
91
|
-
"@wove/react": "1.2.23",
|
92
|
-
"eslint": "8.57.0",
|
96
|
+
"@types/node": "20.14.12",
|
97
|
+
"eslint": "^9.7.0",
|
93
98
|
"imagemin-gifsicle": "7.0.0",
|
94
99
|
"imagemin-jpegtran": "7.0.0",
|
95
|
-
"imagemin-pngquant": "
|
96
|
-
"imagemin-svgo": "
|
100
|
+
"imagemin-pngquant": "10.0.0",
|
101
|
+
"imagemin-svgo": "11.0.1",
|
97
102
|
"npm-run-all": "4.1.5",
|
98
|
-
"
|
99
|
-
"
|
100
|
-
"rimraf": "5.0.5",
|
101
|
-
"swc-unplugin-ts": "1.0.3",
|
102
|
-
"ts-node": "11.0.0-beta.1",
|
103
|
+
"react": "18.3.1",
|
104
|
+
"rimraf": "6.0.1",
|
103
105
|
"vite-tsconfig-paths": "4.3.2",
|
104
|
-
"vitest": "
|
106
|
+
"vitest": "2.0.4",
|
105
107
|
"vue-loader": "17.4.2"
|
106
108
|
},
|
107
109
|
"peerDependencies": {
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
6
|
+
<meta http-equiv="Expires" content="0" />
|
7
|
+
<meta http-equiv="Pragma" content="no-cache" />
|
8
|
+
<meta http-equiv="Cache-control" content="no-cache" />
|
9
|
+
<meta http-equiv="Cache" content="no-cache" />
|
10
|
+
<meta name="format-detection" content="telephone=no,email=no" />
|
11
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
12
|
+
<meta name="apple-touch-fullscreen" content="yes" />
|
13
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
14
|
+
<meta
|
15
|
+
name="viewport"
|
16
|
+
content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover"
|
17
|
+
/>
|
18
|
+
<title><%= title %></title>
|
19
|
+
|
20
|
+
<% if (headBeforeHtmlTags) { %>
|
21
|
+
<% for (let index = 0; index < headBeforeHtmlTags.length; index++) { %>
|
22
|
+
<%= headBeforeHtmlTags[index] %>
|
23
|
+
<% } %>
|
24
|
+
<% } %>
|
25
|
+
<% if (inlineScripts) { %>
|
26
|
+
<script>
|
27
|
+
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
28
|
+
<%= inlineScripts[index] %>
|
29
|
+
<% } %>
|
30
|
+
</script>
|
31
|
+
<% } %>
|
32
|
+
<% if (viewport) { %>
|
33
|
+
<script>
|
34
|
+
<%= viewport %>
|
35
|
+
</script>
|
36
|
+
<% } %>
|
37
|
+
<% if (favicon) { %>
|
38
|
+
<link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
|
39
|
+
<link rel="icon" href="<%= favicon %>" type="image/x-icon" />
|
40
|
+
<% } %>
|
41
|
+
<% if (headBeforeStyles) { %>
|
42
|
+
<% for (let index = 0; index < headBeforeStyles.length; index++) { %>
|
43
|
+
<link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
|
44
|
+
<% } %>
|
45
|
+
<% } %>
|
46
|
+
<% if (headBeforeScripts) { %>
|
47
|
+
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
48
|
+
<script src="<%= headBeforeScripts[index]%>"></script>
|
49
|
+
<% } %>
|
50
|
+
<% } %>
|
51
|
+
</head>
|
52
|
+
|
53
|
+
<body>
|
54
|
+
<div id="app"></div>
|
55
|
+
<% if (bodyAfterScripts) { %>
|
56
|
+
<% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
|
57
|
+
<script src="<%= bodyAfterScripts[index]%>"></script>
|
58
|
+
<% } %>
|
59
|
+
<% } %>
|
60
|
+
</body>
|
61
|
+
</html>
|
@@ -1,3 +0,0 @@
|
|
1
|
-
import { type FlatEvolveOptions } from '../types/types-options.js';
|
2
|
-
import { type EvolveDevServerEntryMap } from './middlewares/types.js';
|
3
|
-
export declare const createDevServerCompilerTasks: (projectCwd: string, mainPage: string, publicIp: string, servedDevServerEntries: EvolveDevServerEntryMap, evolveOptions: FlatEvolveOptions) => Promise<Promise<boolean>[]>;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{relative}from"node:path";import{chalk,logger,mergeOptions,urlJoin}from"@flatjs/common";import webpack from"webpack";import{loadWebpackConfig}from"../create-webpack/load-webpack-config.js";import{shouldEnableReactFastRefresh}from"../helpers/should-enable-react-fast-refresh.js";import{splitToMultiCompilerConfigs}from"../helpers/split-to-multi-compiler.js";import{addCompilerToDevServer}from"./add-compiler-to-dev-server.js";export const createDevServerCompilerTasks=async(e,o,r,t,i)=>{const a=[];for(const[n,l]of Object.entries(t)){const s=l.entryConfig,p=s.options?.moduleFederation;(p?.remotes||[]).forEach((e=>{e.endpoint=e=>{const o=t[e];if(!o)throw new Error(`No servedDevServerEntry found via "${e}"`);return urlJoin(o?.devServerHostUri,["/public"])}}));const{devServerPort:c,devServerHostUri:m}=t[n],f={[n]:s},d=urlJoin(m,["public"]),v=await loadWebpackConfig("development",f,mergeOptions(i,{webpack:{publicPath:d}})),h=shouldEnableReactFastRefresh(!0,[n,s],i),g=webpack(splitToMultiCompilerConfigs(f,v,i,h)[0]);a.push(addCompilerToDevServer(g,h,c,r,i));const u=g.name||"";g.hooks.invalid.tap("fileChange",(o=>{const r=relative(e,o||"");logger.info(`file change ➩ ${chalk(["cyan"])(r)}`,u)})),g.hooks.done.tap("compileDone",(()=>{logger.info(`debug page ➩ ${chalk(["cyan"])(o)}`,u)}))}return a};
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { type EntryMapItem, type EvolveEntryMap } from '../types/types-entry-map.js';
|
2
|
-
import { type FlatEvolveOptions } from '../types/types-options.js';
|
3
|
-
/**
|
4
|
-
* Only fetch single one entry map once `serve`,`build` recycle.
|
5
|
-
* @returns
|
6
|
-
*/
|
7
|
-
export declare const assertOnlySingleEntryItem: (entryMap: EvolveEntryMap, evolveOptions: FlatEvolveOptions) => EntryMapItem;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{normalizeEvolveEntryName}from"./normalize-entry-map.js";export const assertOnlySingleEntryItem=(e,r)=>{if(Object.keys(e).length>1)throw new Error("Only single one entry map support right now for `serve`, `build`!");let t;for(const[r,o]of Object.entries(e)){t=[r,o];break}if(!t)throw new Error('No entry map found while "serve", "build" process!');const[o,n]=t;return[normalizeEvolveEntryName(o,r.projectVirtualPath),n]};
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { type Configuration } from 'webpack';
|
2
|
-
import { type EvolveEntryMap } from '../types/types-entry-map.js';
|
3
|
-
import { type FlatEvolveOptions } from '../types/types-options.js';
|
4
|
-
/**
|
5
|
-
* Split the `webpack` to make sure that we have separated compiler process for each module
|
6
|
-
* @param webpackConfig `Omit<Configuration, 'entry'>` webpack final configuration
|
7
|
-
*/
|
8
|
-
export declare function splitToMultiCompilerConfigs(servedEntries: EvolveEntryMap, webpackConfig: Omit<Configuration, 'entry'>, evolveOptions: FlatEvolveOptions, enabledHmr?: boolean): Configuration[];
|
@@ -1 +0,0 @@
|
|
1
|
-
import{dirname,join}from"path";import{searchPackageDir}from"@armit/package";import{mergeOptions,requireResolve}from"@flatjs/common";import{devReactFastRefresh}from"../constants.js";import{normalizeEvolveEntryName}from"./normalize-entry-map.js";export function splitToMultiCompilerConfigs(e,r,t,o=!1){const a=[];for(const[r,o]of Object.entries(e)){const e=normalizeEvolveEntryName(r,t.projectVirtualPath);a.push({[e]:o.entry})}return a.map((e=>{const t=Object.keys(e)[0];if(o){const r=join(t,devReactFastRefresh.reactRefreshSetup),o=requireResolve(import.meta.url,"@pmmmwh/react-refresh-webpack-plugin"),a=searchPackageDir({cwd:dirname(o)});if(!a)throw new Error("react-refresh-webpack-plugin package directory not found");e[r]=[join(a,"/client/ReactRefreshEntry.js")]}return mergeOptions(r,{name:t,entry:e})}))}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { type EvolveEntryMap } from '../types/types-entry-map.js';
|
2
|
-
import { type FlatEvolveOptions } from '../types/types-options.js';
|
3
|
-
export type EvolveBuildResult = {
|
4
|
-
name?: string;
|
5
|
-
warningStats?: unknown;
|
6
|
-
};
|
7
|
-
/**
|
8
|
-
* The helpers to build one entry at a time
|
9
|
-
* @param singleBuildEntry The single entry
|
10
|
-
* @param buildPublicPath
|
11
|
-
* @param evolveOptions
|
12
|
-
*/
|
13
|
-
export declare const startOneEntryBuild: (singleBuildEntry: EvolveEntryMap, evolveOptions: FlatEvolveOptions) => Promise<EvolveBuildResult>;
|
@@ -1 +0,0 @@
|
|
1
|
-
import webpack from"webpack";import{loadWebpackConfig}from"../create-webpack/load-webpack-config.js";import{splitToMultiCompilerConfigs}from"../helpers/split-to-multi-compiler.js";export const startOneEntryBuild=async(r,o)=>{const t=await loadWebpackConfig("production",r,o),n=splitToMultiCompilerConfigs(r,t,o,!1);if(n.length>1)throw new Error("startOneEntryBuild() only support `compiler` at a time");const e=n[0];return new Promise(((r,t)=>{webpack(e,((n,i)=>{if(n)return t(n);const a=i?.toJson();return a?.errors?.length?t(a.errors):o.rejectWarnings&&a?.warnings?.length?t(a.warnings):void r({name:e.name,warningStats:a?.warnings})}))}))};
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './ts-checker-plugin.js';
|
@@ -1 +0,0 @@
|
|
1
|
-
export*from"./ts-checker-plugin.js";
|