@flatjs/evolve 1.8.1-next.66 → 1.8.1-next.68
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +28 -0
- package/dist/constants.js +17 -1
- package/dist/create-webpack/create-externals.js +6 -1
- package/dist/create-webpack/create-optimization.js +29 -1
- package/dist/create-webpack/create-output.js +35 -1
- package/dist/create-webpack/create-performance.js +7 -1
- package/dist/create-webpack/create-plugins.js +78 -1
- package/dist/create-webpack/create-resolve.js +31 -1
- package/dist/create-webpack/create-rule-sets.js +16 -1
- package/dist/create-webpack/load-webpack-config.js +55 -1
- package/dist/create-webpack/rule-sets/constants.js +3 -1
- package/dist/create-webpack/rule-sets/rule-assets.js +44 -1
- package/dist/create-webpack/rule-sets/rule-css.js +84 -1
- package/dist/create-webpack/rule-sets/rule-less.js +45 -1
- package/dist/create-webpack/rule-sets/rule-scripts.js +27 -1
- package/dist/create-webpack/rule-sets/rule-svg-icon.js +25 -1
- package/dist/create-webpack/rule-sets/rule-utils.js +10 -1
- package/dist/create-webpack/types.js +1 -1
- package/dist/default-options.js +79 -1
- package/dist/define-config/define-config.js +4 -1
- package/dist/define-config/index.js +1 -1
- package/dist/dev-server/add-compiler-to-dev-server.js +47 -1
- package/dist/dev-server/create-app-page-route.js +11 -1
- package/dist/dev-server/create-dev-server-compiler-tasks.js +51 -1
- package/dist/dev-server/create-dev-server-entries.js +27 -1
- package/dist/dev-server/create-dev-server.js +23 -1
- package/dist/dev-server/index.js +6 -1
- package/dist/dev-server/middlewares/create-page-middleware.js +164 -1
- package/dist/dev-server/middlewares/create-public-assets-middleware.js +25 -1
- package/dist/dev-server/middlewares/index.js +2 -1
- package/dist/errors/evolve-build-error.js +10 -1
- package/dist/helpers/allow-px2rem-for-module.js +6 -1
- package/dist/helpers/assert-only-single-entry-item.js +23 -1
- package/dist/helpers/chunk-entry-map.js +21 -1
- package/dist/helpers/enable-bundle-hashname-for-module.js +6 -1
- package/dist/helpers/filter-actived-entries.d.ts +1 -1
- package/dist/helpers/filter-actived-entries.js +41 -1
- package/dist/helpers/get-bundle-file-name.js +23 -1
- package/dist/helpers/get-git-root.js +4 -1
- package/dist/helpers/get-html-plugin-config.d.ts +9 -1
- package/dist/helpers/get-html-plugin-config.js +47 -1
- package/dist/helpers/get-max-process-tasks.d.ts +1 -0
- package/dist/helpers/get-max-process-tasks.js +7 -0
- package/dist/helpers/get-pacakge-dir.js +13 -1
- package/dist/helpers/index.js +15 -1
- package/dist/helpers/merge-babel-options.js +45 -1
- package/dist/helpers/normalize-entry-map.js +38 -1
- package/dist/helpers/open-page.js +15 -1
- package/dist/helpers/print-log.js +49 -1
- package/dist/helpers/refresh-evolve-mock-options.js +23 -1
- package/dist/helpers/resolve-entry-map-input-files.js +20 -1
- package/dist/helpers/script-injects.js +39 -1
- package/dist/helpers/should-enable-react-fast-refresh.js +8 -1
- package/dist/helpers/split-to-multi-compiler.js +22 -1
- package/dist/index.js +5 -1
- package/dist/load-config/index.js +1 -1
- package/dist/load-config/load-evolve-config.js +35 -1
- package/dist/main/env-verify.js +21 -1
- package/dist/main/index.js +4 -1
- package/dist/main/prepare-build.d.ts +4 -8
- package/dist/main/prepare-build.js +38 -1
- package/dist/main/prepare-serve.js +36 -1
- package/dist/main/prepare-static.js +28 -1
- package/dist/main/start-build-dynamic.d.ts +2 -1
- package/dist/main/start-build-dynamic.js +144 -1
- package/dist/main/start-build-worker.d.ts +14 -0
- package/dist/main/start-build-worker.js +41 -0
- package/dist/main/start-build.d.ts +1 -8
- package/dist/main/start-build.js +49 -1
- package/dist/main/start-one-entry-build.d.ts +13 -0
- package/dist/main/start-one-entry-build.js +35 -0
- package/dist/main/start-serve.js +32 -1
- package/dist/main/start-static.js +16 -1
- package/dist/minimizer/create-minimizers.js +25 -1
- package/dist/minimizer/default-options.js +14 -1
- package/dist/minimizer/image-minimizer.js +56 -1
- package/dist/minimizer/index.js +1 -1
- package/dist/minimizer/terser-minimizer.js +15 -3
- package/dist/minimizer/types.js +1 -1
- package/dist/plugins/clean-webpack/clean-webpack-plugin.js +173 -1
- package/dist/plugins/clean-webpack/index.js +22 -1
- package/dist/plugins/define-variable/define-variable-plugin.js +21 -1
- package/dist/plugins/define-variable/index.js +1 -1
- package/dist/plugins/html-inject-scripts/plugin-html-inject-script.js +27 -1
- package/dist/plugins/module-federation/external-template-remotes.js +92 -1
- package/dist/plugins/module-federation/index.js +1 -1
- package/dist/plugins/module-federation/module-federation.js +98 -1
- package/dist/plugins/multi-html/index.js +15 -1
- package/dist/plugins/multi-html/multi-html-cdn-plugin.js +84 -1
- package/dist/plugins/multi-html/multi-html-plugin.js +70 -1
- package/dist/types/index.js +8 -1
- package/dist/types/types-ci.js +1 -1
- package/dist/types/types-dev-server.js +1 -1
- package/dist/types/types-entry-map.js +1 -1
- package/dist/types/types-federation.js +1 -1
- package/dist/types/types-loader-options.js +1 -1
- package/dist/types/types-modular-import.js +1 -1
- package/dist/types/types-multi-html.d.ts +6 -5
- package/dist/types/types-multi-html.js +1 -1
- package/dist/types/types-options.js +1 -1
- package/dist/types/types-plugin-options.js +1 -1
- package/dist/types/types-webpack.d.ts +1 -1
- package/dist/types/types-webpack.js +1 -1
- package/package.json +14 -12
- package/templates/html-plugin/index-dev.html +31 -38
- package/templates/html-plugin/index-inte.html +31 -38
- package/templates/html-plugin/index-inte2.html +31 -38
- package/templates/html-plugin/index-inte3.html +31 -38
- package/templates/html-plugin/index-inte4.html +31 -38
- package/templates/html-plugin/index-me.html +31 -38
- package/templates/html-plugin/index-prod.html +31 -38
- package/templates/html-plugin/index-rc.html +31 -38
- package/templates/html-plugin/index-uat.html +31 -38
- package/templates/module.html +40 -55
@@ -17,48 +17,41 @@
|
|
17
17
|
/>
|
18
18
|
<title><%= title %></title>
|
19
19
|
|
20
|
-
<% if (headBeforeHtmlTags) { %>
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
<% if (inlineScripts) { %>
|
27
|
-
<script>
|
28
|
-
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
29
|
-
<%= inlineScripts[index] %>
|
30
|
-
<% } %>
|
31
|
-
</script>
|
32
|
-
<% } %>
|
33
|
-
|
34
|
-
<% if (viewport) { %>
|
35
|
-
<script><%= viewport %></script>
|
36
|
-
<% } %>
|
37
|
-
|
38
|
-
<% if (favicon) { %>
|
39
|
-
<link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
|
40
|
-
<link rel="icon" href="<%= favicon %>" type="image/x-icon" />
|
41
|
-
<% } %>
|
42
|
-
|
43
|
-
<% if (headBeforeStyles) { %>
|
44
|
-
<% for (let index = 0; index < headBeforeStyles.length; index++) { %>
|
45
|
-
<link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
|
46
|
-
<% } %>
|
47
|
-
<% } %>
|
48
|
-
|
49
|
-
<% if (headBeforeScripts) { %>
|
50
|
-
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
51
|
-
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
20
|
+
<% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
|
21
|
+
headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
|
22
|
+
} %> <% } %> <% if (inlineScripts) { %>
|
23
|
+
<script>
|
24
|
+
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
25
|
+
<%= inlineScripts[index] %>
|
52
26
|
<% } %>
|
53
|
-
|
27
|
+
</script>
|
28
|
+
<% } %> <% if (viewport) { %>
|
29
|
+
<script>
|
30
|
+
<%= viewport %>
|
31
|
+
</script>
|
32
|
+
<% } %> <% if (favicon) { %>
|
33
|
+
<link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
|
34
|
+
<link rel="icon" href="<%= favicon %>" type="image/x-icon" />
|
35
|
+
<% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
|
36
|
+
headBeforeStyles.length; index++) { %>
|
37
|
+
<link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
|
38
|
+
<% } %> <% } %> <% if (headBeforeScripts) { %> <% for (let index = 0; index
|
39
|
+
< headBeforeScripts.length; index++) { %>
|
40
|
+
<script
|
41
|
+
crossorigin="anonymous"
|
42
|
+
src="<%= headBeforeScripts[index]%>"
|
43
|
+
></script>
|
44
|
+
<% } %> <% } %>
|
54
45
|
</head>
|
55
46
|
|
56
47
|
<body>
|
57
48
|
<div id="app"></div>
|
58
|
-
<% if (bodyAfterScripts) { %>
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
49
|
+
<% if (bodyAfterScripts) { %> <% for (let index = 0; index <
|
50
|
+
bodyAfterScripts.length; index++) { %>
|
51
|
+
<script
|
52
|
+
crossorigin="anonymous"
|
53
|
+
src="<%= bodyAfterScripts[index]%>"
|
54
|
+
></script>
|
55
|
+
<% } %> <% } %>
|
63
56
|
</body>
|
64
57
|
</html>
|
@@ -17,48 +17,41 @@
|
|
17
17
|
/>
|
18
18
|
<title><%= title %></title>
|
19
19
|
|
20
|
-
<% if (headBeforeHtmlTags) { %>
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
<% if (inlineScripts) { %>
|
27
|
-
<script>
|
28
|
-
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
29
|
-
<%= inlineScripts[index] %>
|
30
|
-
<% } %>
|
31
|
-
</script>
|
32
|
-
<% } %>
|
33
|
-
|
34
|
-
<% if (viewport) { %>
|
35
|
-
<script><%= viewport %></script>
|
36
|
-
<% } %>
|
37
|
-
|
38
|
-
<% if (favicon) { %>
|
39
|
-
<link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
|
40
|
-
<link rel="icon" href="<%= favicon %>" type="image/x-icon" />
|
41
|
-
<% } %>
|
42
|
-
|
43
|
-
<% if (headBeforeStyles) { %>
|
44
|
-
<% for (let index = 0; index < headBeforeStyles.length; index++) { %>
|
45
|
-
<link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
|
46
|
-
<% } %>
|
47
|
-
<% } %>
|
48
|
-
|
49
|
-
<% if (headBeforeScripts) { %>
|
50
|
-
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
51
|
-
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
20
|
+
<% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
|
21
|
+
headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
|
22
|
+
} %> <% } %> <% if (inlineScripts) { %>
|
23
|
+
<script>
|
24
|
+
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
25
|
+
<%= inlineScripts[index] %>
|
52
26
|
<% } %>
|
53
|
-
|
27
|
+
</script>
|
28
|
+
<% } %> <% if (viewport) { %>
|
29
|
+
<script>
|
30
|
+
<%= viewport %>
|
31
|
+
</script>
|
32
|
+
<% } %> <% if (favicon) { %>
|
33
|
+
<link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
|
34
|
+
<link rel="icon" href="<%= favicon %>" type="image/x-icon" />
|
35
|
+
<% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
|
36
|
+
headBeforeStyles.length; index++) { %>
|
37
|
+
<link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
|
38
|
+
<% } %> <% } %> <% if (headBeforeScripts) { %> <% for (let index = 0; index
|
39
|
+
< headBeforeScripts.length; index++) { %>
|
40
|
+
<script
|
41
|
+
crossorigin="anonymous"
|
42
|
+
src="<%= headBeforeScripts[index]%>"
|
43
|
+
></script>
|
44
|
+
<% } %> <% } %>
|
54
45
|
</head>
|
55
46
|
|
56
47
|
<body>
|
57
48
|
<div id="app"></div>
|
58
|
-
<% if (bodyAfterScripts) { %>
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
49
|
+
<% if (bodyAfterScripts) { %> <% for (let index = 0; index <
|
50
|
+
bodyAfterScripts.length; index++) { %>
|
51
|
+
<script
|
52
|
+
crossorigin="anonymous"
|
53
|
+
src="<%= bodyAfterScripts[index]%>"
|
54
|
+
></script>
|
55
|
+
<% } %> <% } %>
|
63
56
|
</body>
|
64
57
|
</html>
|
@@ -17,48 +17,41 @@
|
|
17
17
|
/>
|
18
18
|
<title><%= title %></title>
|
19
19
|
|
20
|
-
<% if (headBeforeHtmlTags) { %>
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
<% if (inlineScripts) { %>
|
27
|
-
<script>
|
28
|
-
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
29
|
-
<%= inlineScripts[index] %>
|
30
|
-
<% } %>
|
31
|
-
</script>
|
32
|
-
<% } %>
|
33
|
-
|
34
|
-
<% if (viewport) { %>
|
35
|
-
<script><%= viewport %></script>
|
36
|
-
<% } %>
|
37
|
-
|
38
|
-
<% if (favicon) { %>
|
39
|
-
<link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
|
40
|
-
<link rel="icon" href="<%= favicon %>" type="image/x-icon" />
|
41
|
-
<% } %>
|
42
|
-
|
43
|
-
<% if (headBeforeStyles) { %>
|
44
|
-
<% for (let index = 0; index < headBeforeStyles.length; index++) { %>
|
45
|
-
<link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
|
46
|
-
<% } %>
|
47
|
-
<% } %>
|
48
|
-
|
49
|
-
<% if (headBeforeScripts) { %>
|
50
|
-
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
51
|
-
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
20
|
+
<% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
|
21
|
+
headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
|
22
|
+
} %> <% } %> <% if (inlineScripts) { %>
|
23
|
+
<script>
|
24
|
+
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
25
|
+
<%= inlineScripts[index] %>
|
52
26
|
<% } %>
|
53
|
-
|
27
|
+
</script>
|
28
|
+
<% } %> <% if (viewport) { %>
|
29
|
+
<script>
|
30
|
+
<%= viewport %>
|
31
|
+
</script>
|
32
|
+
<% } %> <% if (favicon) { %>
|
33
|
+
<link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
|
34
|
+
<link rel="icon" href="<%= favicon %>" type="image/x-icon" />
|
35
|
+
<% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
|
36
|
+
headBeforeStyles.length; index++) { %>
|
37
|
+
<link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
|
38
|
+
<% } %> <% } %> <% if (headBeforeScripts) { %> <% for (let index = 0; index
|
39
|
+
< headBeforeScripts.length; index++) { %>
|
40
|
+
<script
|
41
|
+
crossorigin="anonymous"
|
42
|
+
src="<%= headBeforeScripts[index]%>"
|
43
|
+
></script>
|
44
|
+
<% } %> <% } %>
|
54
45
|
</head>
|
55
46
|
|
56
47
|
<body>
|
57
48
|
<div id="app"></div>
|
58
|
-
<% if (bodyAfterScripts) { %>
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
49
|
+
<% if (bodyAfterScripts) { %> <% for (let index = 0; index <
|
50
|
+
bodyAfterScripts.length; index++) { %>
|
51
|
+
<script
|
52
|
+
crossorigin="anonymous"
|
53
|
+
src="<%= bodyAfterScripts[index]%>"
|
54
|
+
></script>
|
55
|
+
<% } %> <% } %>
|
63
56
|
</body>
|
64
57
|
</html>
|
package/templates/module.html
CHANGED
@@ -17,70 +17,55 @@
|
|
17
17
|
/>
|
18
18
|
<title><%= title %></title>
|
19
19
|
|
20
|
-
<% if (headBeforeHtmlTags) { %>
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
<% } %>
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
<% if (
|
39
|
-
|
40
|
-
|
41
|
-
<% } %>
|
42
|
-
|
43
|
-
<% if (headBeforeStyles) { %>
|
44
|
-
<% for (let index = 0; index < headBeforeStyles.length; index++) { %>
|
45
|
-
<link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
|
46
|
-
<% } %>
|
47
|
-
<% } %>
|
20
|
+
<% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
|
21
|
+
headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
|
22
|
+
} %> <% } %> <% if (inlineScripts) { %>
|
23
|
+
<script>
|
24
|
+
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
25
|
+
<%= inlineScripts[index] %>
|
26
|
+
<% } %>
|
27
|
+
</script>
|
28
|
+
<% } %> <% if (viewport) { %>
|
29
|
+
<script>
|
30
|
+
<%= viewport %>
|
31
|
+
</script>
|
32
|
+
<% } %> <% if (favicon) { %>
|
33
|
+
<link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
|
34
|
+
<link rel="icon" href="<%= favicon %>" type="image/x-icon" />
|
35
|
+
<% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
|
36
|
+
headBeforeStyles.length; index++) { %>
|
37
|
+
<link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
|
38
|
+
<% } %> <% } %> <% if (styles.length) { %> <% _.forEach(styles, (css)=> { %>
|
39
|
+
<link href="<%= css %>" rel="stylesheet" />
|
40
|
+
<% }) %> <% } %>
|
48
41
|
|
49
|
-
<% if (styles.length) { %>
|
50
|
-
<% _.forEach(styles, (css)=> { %>
|
51
|
-
<link href="<%= css %>" rel="stylesheet" />
|
52
|
-
<% }) %>
|
53
|
-
<% } %>
|
54
|
-
|
55
42
|
<script>
|
56
43
|
window.GLOBAL = <%= JSON.stringify(Object.assign(global, {})) %>;
|
57
44
|
</script>
|
58
45
|
|
59
|
-
<% if (headBeforeScripts) { %>
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
46
|
+
<% if (headBeforeScripts) { %> <% for (let index = 0; index <
|
47
|
+
headBeforeScripts.length; index++) { %>
|
48
|
+
<script
|
49
|
+
crossorigin="anonymous"
|
50
|
+
src="<%= headBeforeScripts[index]%>"
|
51
|
+
></script>
|
52
|
+
<% } %> <% } %>
|
64
53
|
</head>
|
65
54
|
|
66
55
|
<body>
|
67
56
|
<div id="app"></div>
|
68
57
|
<% if (moduleFederationScripts.length) { %>
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
<% } %>
|
73
|
-
|
74
|
-
<% if (
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
<%
|
81
|
-
<% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
|
82
|
-
<script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
|
83
|
-
<% } %>
|
84
|
-
<% } %>
|
58
|
+
<script>
|
59
|
+
<%= moduleFederationScripts %>
|
60
|
+
</script>
|
61
|
+
<% } %> <% if (scripts.length) { %> <% _.forEach(scripts, (js)=> { %>
|
62
|
+
<script src="<%= js %>"></script>
|
63
|
+
<% }) %> <% } %> <% if (bodyAfterScripts) { %> <% for (let index = 0; index
|
64
|
+
< bodyAfterScripts.length; index++) { %>
|
65
|
+
<script
|
66
|
+
crossorigin="anonymous"
|
67
|
+
src="<%= bodyAfterScripts[index]%>"
|
68
|
+
></script>
|
69
|
+
<% } %> <% } %>
|
85
70
|
</body>
|
86
71
|
</html>
|