@modern-js/runtime 2.60.1-alpha.5 → 2.60.2-alpha.6

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.
@@ -125,10 +125,10 @@ const runtimePlugin = (params) => ({
125
125
  * Compatible with the reference path of the old version of the plugin.
126
126
  */
127
127
  [`@${metaName}/runtime/plugins`]: pluginsExportsUtils.getPath(),
128
- "@meta/runtime/browser$": require.resolve("../core/browser").replace("/cjs/", "/esm/"),
129
- "@meta/runtime/react$": require.resolve("../core/react").replace("/cjs/", "/esm/"),
130
- "@meta/runtime/context$": require.resolve("../core/context").replace("/cjs/", "/esm/"),
131
- "@meta/runtime$": require.resolve("../index").replace("/cjs/", "/esm/")
128
+ "@meta/runtime/browser$": require.resolve("@modern-js/runtime/browser"),
129
+ "@meta/runtime/react$": require.resolve("@modern-js/runtime/react"),
130
+ "@meta/runtime/context$": require.resolve("@modern-js/runtime/context"),
131
+ "@meta/runtime$": require.resolve("@modern-js/runtime")
132
132
  },
133
133
  globalVars: {
134
134
  "process.env.IS_REACT18": process.env.IS_REACT18
@@ -185,6 +185,11 @@ const documentPlugin = () => ({
185
185
  };
186
186
  return {
187
187
  config: () => {
188
+ var _userConfig_tools;
189
+ const userConfig = api.useConfigContext();
190
+ if (((_userConfig_tools = userConfig.tools) === null || _userConfig_tools === void 0 ? void 0 : _userConfig_tools.htmlPlugin) === false) {
191
+ return {};
192
+ }
188
193
  return {
189
194
  tools: {
190
195
  htmlPlugin: (options, entry) => {
@@ -109,7 +109,7 @@ var runtimePlugin = function(params) {
109
109
  }, /**
110
110
  * Compatible with the reference path of the old version of the plugin.
111
111
  */
112
- _define_property(_obj, "@".concat(metaName, "/runtime/plugins"), pluginsExportsUtils.getPath()), _define_property(_obj, "@meta/runtime/browser$", require.resolve("../core/browser").replace("/cjs/", "/esm/")), _define_property(_obj, "@meta/runtime/react$", require.resolve("../core/react").replace("/cjs/", "/esm/")), _define_property(_obj, "@meta/runtime/context$", require.resolve("../core/context").replace("/cjs/", "/esm/")), _define_property(_obj, "@meta/runtime$", require.resolve("../index").replace("/cjs/", "/esm/")), _obj),
112
+ _define_property(_obj, "@".concat(metaName, "/runtime/plugins"), pluginsExportsUtils.getPath()), _define_property(_obj, "@meta/runtime/browser$", require.resolve("@modern-js/runtime/browser")), _define_property(_obj, "@meta/runtime/react$", require.resolve("@modern-js/runtime/react")), _define_property(_obj, "@meta/runtime/context$", require.resolve("@modern-js/runtime/context")), _define_property(_obj, "@meta/runtime$", require.resolve("@modern-js/runtime")), _obj),
113
113
  globalVars: {
114
114
  "process.env.IS_REACT18": process.env.IS_REACT18
115
115
  }
@@ -222,6 +222,11 @@ var documentPlugin = function() {
222
222
  2,
223
223
  {
224
224
  config: function() {
225
+ var _userConfig_tools;
226
+ var userConfig = api.useConfigContext();
227
+ if (((_userConfig_tools = userConfig.tools) === null || _userConfig_tools === void 0 ? void 0 : _userConfig_tools.htmlPlugin) === false) {
228
+ return {};
229
+ }
225
230
  return {
226
231
  tools: {
227
232
  htmlPlugin: function(options, entry) {
@@ -86,10 +86,10 @@ const runtimePlugin = (params) => ({
86
86
  * Compatible with the reference path of the old version of the plugin.
87
87
  */
88
88
  [`@${metaName}/runtime/plugins`]: pluginsExportsUtils.getPath(),
89
- "@meta/runtime/browser$": require.resolve("../core/browser").replace("/cjs/", "/esm/"),
90
- "@meta/runtime/react$": require.resolve("../core/react").replace("/cjs/", "/esm/"),
91
- "@meta/runtime/context$": require.resolve("../core/context").replace("/cjs/", "/esm/"),
92
- "@meta/runtime$": require.resolve("../index").replace("/cjs/", "/esm/")
89
+ "@meta/runtime/browser$": require.resolve("@modern-js/runtime/browser"),
90
+ "@meta/runtime/react$": require.resolve("@modern-js/runtime/react"),
91
+ "@meta/runtime/context$": require.resolve("@modern-js/runtime/context"),
92
+ "@meta/runtime$": require.resolve("@modern-js/runtime")
93
93
  },
94
94
  globalVars: {
95
95
  "process.env.IS_REACT18": process.env.IS_REACT18
@@ -150,6 +150,11 @@ const documentPlugin = () => ({
150
150
  };
151
151
  return {
152
152
  config: () => {
153
+ var _userConfig_tools;
154
+ const userConfig = api.useConfigContext();
155
+ if (((_userConfig_tools = userConfig.tools) === null || _userConfig_tools === void 0 ? void 0 : _userConfig_tools.htmlPlugin) === false) {
156
+ return {};
157
+ }
153
158
  return {
154
159
  tools: {
155
160
  htmlPlugin: (options, entry) => {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.60.1-alpha.5",
18
+ "version": "2.60.2-alpha.6",
19
19
  "engines": {
20
20
  "node": ">=14.17.6"
21
21
  },
@@ -199,11 +199,11 @@
199
199
  "react-is": "^18",
200
200
  "react-side-effect": "^2.1.1",
201
201
  "styled-components": "^5.3.1",
202
- "@modern-js/plugin": "2.60.0",
203
- "@modern-js/runtime-utils": "2.60.0",
204
- "@modern-js/types": "2.60.0",
205
- "@modern-js/utils": "2.60.1-alpha.0",
206
- "@modern-js/plugin-data-loader": "2.60.0"
202
+ "@modern-js/plugin": "2.60.1",
203
+ "@modern-js/plugin-data-loader": "2.60.1",
204
+ "@modern-js/types": "2.60.1",
205
+ "@modern-js/runtime-utils": "2.60.1",
206
+ "@modern-js/utils": "2.60.1"
207
207
  },
208
208
  "peerDependencies": {
209
209
  "react": ">=17",
@@ -226,10 +226,10 @@
226
226
  "ts-jest": "^29.1.0",
227
227
  "typescript": "^5",
228
228
  "webpack": "^5.94.0",
229
- "@modern-js/core": "2.60.0",
230
- "@modern-js/app-tools": "2.60.0",
231
- "@scripts/build": "2.60.0",
232
- "@scripts/jest-config": "2.60.0"
229
+ "@modern-js/core": "2.60.1",
230
+ "@scripts/build": "2.60.1",
231
+ "@modern-js/app-tools": "2.60.1",
232
+ "@scripts/jest-config": "2.60.1"
233
233
  },
234
234
  "sideEffects": false,
235
235
  "publishConfig": {