@modern-js/runtime 2.47.1 → 2.48.1

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.
@@ -1,7 +1,6 @@
1
1
  import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
2
  import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
3
3
  import { _ as _create_class } from "@swc/helpers/_/_create_class";
4
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
5
4
  import { _ as _instanceof } from "@swc/helpers/_/_instanceof";
6
5
  import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
7
6
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
@@ -65,10 +64,205 @@ var LoadableCollector = /* @__PURE__ */ function() {
65
64
  "use strict";
66
65
  function LoadableCollector2(options) {
67
66
  _class_call_check(this, LoadableCollector2);
68
- _define_property(this, "options", void 0);
69
- _define_property(this, "extractor", void 0);
70
67
  this.options = options;
71
68
  }
69
+ var _proto = LoadableCollector2.prototype;
70
+ _proto.collect = function collect(comopnent) {
71
+ var _this_options = this.options, stats = _this_options.stats, entryName = _this_options.entryName;
72
+ if (!stats) {
73
+ return comopnent;
74
+ }
75
+ this.extractor = new ChunkExtractor({
76
+ stats,
77
+ entrypoints: [
78
+ entryName
79
+ ]
80
+ });
81
+ return this.extractor.collectChunks(comopnent);
82
+ };
83
+ _proto.effect = function effect() {
84
+ var _this = this;
85
+ return _async_to_generator(function() {
86
+ var extractor, chunks, scriptChunks, styleChunks;
87
+ return _ts_generator(this, function(_state) {
88
+ switch (_state.label) {
89
+ case 0:
90
+ if (!_this.extractor) {
91
+ return [
92
+ 2
93
+ ];
94
+ }
95
+ extractor = _this.extractor;
96
+ chunks = extractor.getChunkAssets(extractor.chunks);
97
+ scriptChunks = generateChunks(chunks, "js");
98
+ styleChunks = generateChunks(chunks, "css");
99
+ _this.emitLoadableScripts(extractor);
100
+ return [
101
+ 4,
102
+ _this.emitScriptAssets(scriptChunks)
103
+ ];
104
+ case 1:
105
+ _state.sent();
106
+ return [
107
+ 4,
108
+ _this.emitStyleAssets(styleChunks)
109
+ ];
110
+ case 2:
111
+ _state.sent();
112
+ return [
113
+ 2
114
+ ];
115
+ }
116
+ });
117
+ })();
118
+ };
119
+ _proto.emitLoadableScripts = function emitLoadableScripts(extractor) {
120
+ var check = function(scripts2) {
121
+ return (scripts2 || "").includes("__LOADABLE_REQUIRED_CHUNKS___ext");
122
+ };
123
+ var scripts = extractor.getScriptTags();
124
+ if (!check(scripts)) {
125
+ return;
126
+ }
127
+ var _this_options = this.options, chunksMap = _this_options.result.chunksMap;
128
+ var s = scripts.split("</script>").slice(0, 2).map(function(i) {
129
+ return "".concat(i, "</script>");
130
+ }).join("");
131
+ chunksMap.js += s;
132
+ };
133
+ _proto.emitScriptAssets = function emitScriptAssets(chunks) {
134
+ var _this = this;
135
+ return _async_to_generator(function() {
136
+ var _this_options, template, config, nonce, result, chunksMap, _config_scriptLoading, scriptLoading, enableInlineScripts, scriptLoadingAtr, attributes, scripts;
137
+ return _ts_generator(this, function(_state) {
138
+ switch (_state.label) {
139
+ case 0:
140
+ _this_options = _this.options, template = _this_options.template, config = _this_options.config, nonce = _this_options.nonce, result = _this_options.result;
141
+ chunksMap = result.chunksMap;
142
+ _config_scriptLoading = config.scriptLoading, scriptLoading = _config_scriptLoading === void 0 ? "defer" : _config_scriptLoading, enableInlineScripts = config.enableInlineScripts;
143
+ scriptLoadingAtr = {
144
+ defer: scriptLoading === "defer" ? true : void 0,
145
+ type: scriptLoading === "module" ? "module" : void 0,
146
+ async: scriptLoading === "async" ? true : void 0
147
+ };
148
+ attributes = attributesToString(_this.generateAttributes(_object_spread({
149
+ nonce
150
+ }, scriptLoadingAtr)));
151
+ return [
152
+ 4,
153
+ Promise.all(chunks.filter(function(chunk) {
154
+ var _this_existsAssets;
155
+ var jsChunkReg = new RegExp('<script .*src="'.concat(chunk.url, '".*>'));
156
+ return !jsChunkReg.test(template) && !((_this_existsAssets = _this.existsAssets) === null || _this_existsAssets === void 0 ? void 0 : _this_existsAssets.includes(chunk.path));
157
+ }).map(function() {
158
+ var _ref = _async_to_generator(function(chunk) {
159
+ var script;
160
+ return _ts_generator(this, function(_state2) {
161
+ script = "<script".concat(attributes, ' src="').concat(chunk.url, '"></script>');
162
+ if (checkIsNode() && checkIsInline(chunk, enableInlineScripts)) {
163
+ return [
164
+ 2,
165
+ readAsset(chunk).then(function(content) {
166
+ return "<script>".concat(content, "</script>");
167
+ }).catch(function(_) {
168
+ return script;
169
+ })
170
+ ];
171
+ } else {
172
+ return [
173
+ 2,
174
+ script
175
+ ];
176
+ }
177
+ return [
178
+ 2
179
+ ];
180
+ });
181
+ });
182
+ return function(chunk) {
183
+ return _ref.apply(this, arguments);
184
+ };
185
+ }()))
186
+ ];
187
+ case 1:
188
+ scripts = _state.sent();
189
+ chunksMap.js += scripts.filter(function(script) {
190
+ return Boolean(script);
191
+ }).join("");
192
+ return [
193
+ 2
194
+ ];
195
+ }
196
+ });
197
+ })();
198
+ };
199
+ _proto.emitStyleAssets = function emitStyleAssets(chunks) {
200
+ var _this = this;
201
+ return _async_to_generator(function() {
202
+ var _this_options, template, chunksMap, enableInlineStyles, atrributes, css;
203
+ return _ts_generator(this, function(_state) {
204
+ switch (_state.label) {
205
+ case 0:
206
+ _this_options = _this.options, template = _this_options.template, chunksMap = _this_options.result.chunksMap, enableInlineStyles = _this_options.config.enableInlineStyles;
207
+ atrributes = attributesToString(_this.generateAttributes());
208
+ return [
209
+ 4,
210
+ Promise.all(chunks.filter(function(chunk) {
211
+ var _this_existsAssets;
212
+ var cssChunkReg = new RegExp('<link .*href="'.concat(chunk.url, '".*>'));
213
+ return !cssChunkReg.test(template) && !((_this_existsAssets = _this.existsAssets) === null || _this_existsAssets === void 0 ? void 0 : _this_existsAssets.includes(chunk.path));
214
+ }).map(function() {
215
+ var _ref = _async_to_generator(function(chunk) {
216
+ var link;
217
+ return _ts_generator(this, function(_state2) {
218
+ link = "<link".concat(atrributes, ' href="').concat(chunk.url, '" rel="stylesheet" />');
219
+ if (checkIsNode() && checkIsInline(chunk, enableInlineStyles)) {
220
+ return [
221
+ 2,
222
+ readAsset(chunk).then(function(content) {
223
+ return "<style>".concat(content, "</style>");
224
+ }).catch(function(_) {
225
+ return link;
226
+ })
227
+ ];
228
+ } else {
229
+ return [
230
+ 2,
231
+ link
232
+ ];
233
+ }
234
+ return [
235
+ 2
236
+ ];
237
+ });
238
+ });
239
+ return function(chunk) {
240
+ return _ref.apply(this, arguments);
241
+ };
242
+ }()))
243
+ ];
244
+ case 1:
245
+ css = _state.sent();
246
+ chunksMap.css += css.filter(function(css2) {
247
+ return Boolean(css2);
248
+ }).join("");
249
+ return [
250
+ 2
251
+ ];
252
+ }
253
+ });
254
+ })();
255
+ };
256
+ _proto.generateAttributes = function generateAttributes() {
257
+ var extraAtr = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
258
+ var config = this.options.config;
259
+ var crossorigin = config.crossorigin;
260
+ var attributes = {};
261
+ if (crossorigin) {
262
+ attributes.crossorigin = crossorigin === true ? "anonymous" : crossorigin;
263
+ }
264
+ return _object_spread({}, attributes, extraAtr);
265
+ };
72
266
  _create_class(LoadableCollector2, [
73
267
  {
74
268
  key: "existsAssets",
@@ -77,220 +271,6 @@ var LoadableCollector = /* @__PURE__ */ function() {
77
271
  var _this_options = this.options, routeManifest = _this_options.routeManifest, entryName = _this_options.entryName;
78
272
  return routeManifest === null || routeManifest === void 0 ? void 0 : (_routeManifest_routeAssets = routeManifest.routeAssets) === null || _routeManifest_routeAssets === void 0 ? void 0 : (_routeManifest_routeAssets_entryName = _routeManifest_routeAssets[entryName]) === null || _routeManifest_routeAssets_entryName === void 0 ? void 0 : _routeManifest_routeAssets_entryName.assets;
79
273
  }
80
- },
81
- {
82
- key: "collect",
83
- value: function collect(comopnent) {
84
- var _this_options = this.options, stats = _this_options.stats, entryName = _this_options.entryName;
85
- if (!stats) {
86
- return comopnent;
87
- }
88
- this.extractor = new ChunkExtractor({
89
- stats,
90
- entrypoints: [
91
- entryName
92
- ]
93
- });
94
- return this.extractor.collectChunks(comopnent);
95
- }
96
- },
97
- {
98
- key: "effect",
99
- value: function effect() {
100
- var _this = this;
101
- return _async_to_generator(function() {
102
- var extractor, chunks, scriptChunks, styleChunks;
103
- return _ts_generator(this, function(_state) {
104
- switch (_state.label) {
105
- case 0:
106
- if (!_this.extractor) {
107
- return [
108
- 2
109
- ];
110
- }
111
- extractor = _this.extractor;
112
- chunks = extractor.getChunkAssets(extractor.chunks);
113
- scriptChunks = generateChunks(chunks, "js");
114
- styleChunks = generateChunks(chunks, "css");
115
- _this.emitLoadableScripts(extractor);
116
- return [
117
- 4,
118
- _this.emitScriptAssets(scriptChunks)
119
- ];
120
- case 1:
121
- _state.sent();
122
- return [
123
- 4,
124
- _this.emitStyleAssets(styleChunks)
125
- ];
126
- case 2:
127
- _state.sent();
128
- return [
129
- 2
130
- ];
131
- }
132
- });
133
- })();
134
- }
135
- },
136
- {
137
- key: "emitLoadableScripts",
138
- value: function emitLoadableScripts(extractor) {
139
- var check = function(scripts2) {
140
- return (scripts2 || "").includes("__LOADABLE_REQUIRED_CHUNKS___ext");
141
- };
142
- var scripts = extractor.getScriptTags();
143
- if (!check(scripts)) {
144
- return;
145
- }
146
- var _this_options = this.options, chunksMap = _this_options.result.chunksMap;
147
- var s = scripts.split("</script>").slice(0, 2).map(function(i) {
148
- return "".concat(i, "</script>");
149
- }).join("");
150
- chunksMap.js += s;
151
- }
152
- },
153
- {
154
- key: "emitScriptAssets",
155
- value: function emitScriptAssets(chunks) {
156
- var _this = this;
157
- return _async_to_generator(function() {
158
- var _this_options, template, config, nonce, result, chunksMap, _config_scriptLoading, scriptLoading, enableInlineScripts, scriptLoadingAtr, attributes, scripts;
159
- return _ts_generator(this, function(_state) {
160
- switch (_state.label) {
161
- case 0:
162
- _this_options = _this.options, template = _this_options.template, config = _this_options.config, nonce = _this_options.nonce, result = _this_options.result;
163
- chunksMap = result.chunksMap;
164
- _config_scriptLoading = config.scriptLoading, scriptLoading = _config_scriptLoading === void 0 ? "defer" : _config_scriptLoading, enableInlineScripts = config.enableInlineScripts;
165
- scriptLoadingAtr = {
166
- defer: scriptLoading === "defer" ? true : void 0,
167
- type: scriptLoading === "module" ? "module" : void 0,
168
- async: scriptLoading === "async" ? true : void 0
169
- };
170
- attributes = attributesToString(_this.generateAttributes(_object_spread({
171
- nonce
172
- }, scriptLoadingAtr)));
173
- return [
174
- 4,
175
- Promise.all(chunks.filter(function(chunk) {
176
- var _this_existsAssets;
177
- var jsChunkReg = new RegExp('<script .*src="'.concat(chunk.url, '".*>'));
178
- return !jsChunkReg.test(template) && !((_this_existsAssets = _this.existsAssets) === null || _this_existsAssets === void 0 ? void 0 : _this_existsAssets.includes(chunk.path));
179
- }).map(function() {
180
- var _ref = _async_to_generator(function(chunk) {
181
- var script;
182
- return _ts_generator(this, function(_state2) {
183
- script = "<script".concat(attributes, ' src="').concat(chunk.url, '"></script>');
184
- if (checkIsNode() && checkIsInline(chunk, enableInlineScripts)) {
185
- return [
186
- 2,
187
- readAsset(chunk).then(function(content) {
188
- return "<script>".concat(content, "</script>");
189
- }).catch(function(_) {
190
- return script;
191
- })
192
- ];
193
- } else {
194
- return [
195
- 2,
196
- script
197
- ];
198
- }
199
- return [
200
- 2
201
- ];
202
- });
203
- });
204
- return function(chunk) {
205
- return _ref.apply(this, arguments);
206
- };
207
- }()))
208
- ];
209
- case 1:
210
- scripts = _state.sent();
211
- chunksMap.js += scripts.filter(function(script) {
212
- return Boolean(script);
213
- }).join("");
214
- return [
215
- 2
216
- ];
217
- }
218
- });
219
- })();
220
- }
221
- },
222
- {
223
- key: "emitStyleAssets",
224
- value: function emitStyleAssets(chunks) {
225
- var _this = this;
226
- return _async_to_generator(function() {
227
- var _this_options, template, chunksMap, enableInlineStyles, atrributes, css;
228
- return _ts_generator(this, function(_state) {
229
- switch (_state.label) {
230
- case 0:
231
- _this_options = _this.options, template = _this_options.template, chunksMap = _this_options.result.chunksMap, enableInlineStyles = _this_options.config.enableInlineStyles;
232
- atrributes = attributesToString(_this.generateAttributes());
233
- return [
234
- 4,
235
- Promise.all(chunks.filter(function(chunk) {
236
- var _this_existsAssets;
237
- var cssChunkReg = new RegExp('<link .*href="'.concat(chunk.url, '".*>'));
238
- return !cssChunkReg.test(template) && !((_this_existsAssets = _this.existsAssets) === null || _this_existsAssets === void 0 ? void 0 : _this_existsAssets.includes(chunk.path));
239
- }).map(function() {
240
- var _ref = _async_to_generator(function(chunk) {
241
- var link;
242
- return _ts_generator(this, function(_state2) {
243
- link = "<link".concat(atrributes, ' href="').concat(chunk.url, '" rel="stylesheet" />');
244
- if (checkIsNode() && checkIsInline(chunk, enableInlineStyles)) {
245
- return [
246
- 2,
247
- readAsset(chunk).then(function(content) {
248
- return "<style>".concat(content, "</style>");
249
- }).catch(function(_) {
250
- return link;
251
- })
252
- ];
253
- } else {
254
- return [
255
- 2,
256
- link
257
- ];
258
- }
259
- return [
260
- 2
261
- ];
262
- });
263
- });
264
- return function(chunk) {
265
- return _ref.apply(this, arguments);
266
- };
267
- }()))
268
- ];
269
- case 1:
270
- css = _state.sent();
271
- chunksMap.css += css.filter(function(css2) {
272
- return Boolean(css2);
273
- }).join("");
274
- return [
275
- 2
276
- ];
277
- }
278
- });
279
- })();
280
- }
281
- },
282
- {
283
- key: "generateAttributes",
284
- value: function generateAttributes() {
285
- var extraAtr = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
286
- var config = this.options.config;
287
- var crossorigin = config.crossorigin;
288
- var attributes = {};
289
- if (crossorigin) {
290
- attributes.crossorigin = crossorigin === true ? "anonymous" : crossorigin;
291
- }
292
- return _object_spread({}, attributes, extraAtr);
293
- }
294
274
  }
295
275
  ]);
296
276
  return LoadableCollector2;
@@ -1,56 +1,46 @@
1
1
  import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
2
  import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
3
- import { _ as _create_class } from "@swc/helpers/_/_create_class";
4
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
5
3
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
6
4
  import ReactDomServer from "react-dom/server";
7
5
  var Render = /* @__PURE__ */ function() {
8
6
  "use strict";
9
7
  function Render2(App) {
10
8
  _class_call_check(this, Render2);
11
- _define_property(this, "App", void 0);
12
- _define_property(this, "collectors", []);
9
+ this.collectors = [];
13
10
  this.App = App;
14
11
  }
15
- _create_class(Render2, [
16
- {
17
- key: "addCollector",
18
- value: function addCollector(collector) {
19
- this.collectors.push(collector);
20
- return this;
21
- }
22
- },
23
- {
24
- key: "finish",
25
- value: function finish() {
26
- var _this = this;
27
- return _async_to_generator(function() {
28
- var App, html;
29
- return _ts_generator(this, function(_state) {
30
- switch (_state.label) {
31
- case 0:
32
- App = _this.collectors.reduce(function(pre, collector) {
33
- return collector.collect(pre);
34
- }, _this.App);
35
- html = ReactDomServer.renderToString(App);
36
- return [
37
- 4,
38
- Promise.all(_this.collectors.map(function(component) {
39
- return component.effect();
40
- }))
41
- ];
42
- case 1:
43
- _state.sent();
44
- return [
45
- 2,
46
- html
47
- ];
48
- }
49
- });
50
- })();
51
- }
52
- }
53
- ]);
12
+ var _proto = Render2.prototype;
13
+ _proto.addCollector = function addCollector(collector) {
14
+ this.collectors.push(collector);
15
+ return this;
16
+ };
17
+ _proto.finish = function finish() {
18
+ var _this = this;
19
+ return _async_to_generator(function() {
20
+ var App, html;
21
+ return _ts_generator(this, function(_state) {
22
+ switch (_state.label) {
23
+ case 0:
24
+ App = _this.collectors.reduce(function(pre, collector) {
25
+ return collector.collect(pre);
26
+ }, _this.App);
27
+ html = ReactDomServer.renderToString(App);
28
+ return [
29
+ 4,
30
+ Promise.all(_this.collectors.map(function(component) {
31
+ return component.effect();
32
+ }))
33
+ ];
34
+ case 1:
35
+ _state.sent();
36
+ return [
37
+ 2,
38
+ html
39
+ ];
40
+ }
41
+ });
42
+ })();
43
+ };
54
44
  return Render2;
55
45
  }();
56
46
  function createRender(App) {
@@ -1,30 +1,20 @@
1
1
  import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
2
- import { _ as _create_class } from "@swc/helpers/_/_create_class";
3
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
4
2
  import { ServerStyleSheet } from "styled-components";
5
3
  var StyledCollector = /* @__PURE__ */ function() {
6
4
  "use strict";
7
5
  function StyledCollector2(result) {
8
6
  _class_call_check(this, StyledCollector2);
9
- _define_property(this, "sheet", new ServerStyleSheet());
10
- _define_property(this, "result", void 0);
7
+ this.sheet = new ServerStyleSheet();
11
8
  this.result = result;
12
9
  }
13
- _create_class(StyledCollector2, [
14
- {
15
- key: "collect",
16
- value: function collect(comopnent) {
17
- return this.sheet.collectStyles(comopnent);
18
- }
19
- },
20
- {
21
- key: "effect",
22
- value: function effect() {
23
- var css = this.sheet.getStyleTags();
24
- this.result.chunksMap.css += css;
25
- }
26
- }
27
- ]);
10
+ var _proto = StyledCollector2.prototype;
11
+ _proto.collect = function collect(comopnent) {
12
+ return this.sheet.collectStyles(comopnent);
13
+ };
14
+ _proto.effect = function effect() {
15
+ var css = this.sheet.getStyleTags();
16
+ this.result.chunksMap.css += css;
17
+ };
28
18
  return StyledCollector2;
29
19
  }();
30
20
  function createStyledCollector(result) {
@@ -2,7 +2,6 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
2
2
  var __commonJS = (cb, mod) => function __require() {
3
3
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
4
4
  };
5
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
6
5
  import path from "path";
7
6
  import { fs } from "@modern-js/utils";
8
7
  var require_loadable_bundler_plugin = __commonJS({
@@ -82,8 +81,6 @@ var require_loadable_bundler_plugin = __commonJS({
82
81
  outputAsset: true,
83
82
  chunkLoadingGlobal: "__LOADABLE_LOADED_CHUNKS__"
84
83
  }) {
85
- _define_property(this, "opts", void 0);
86
- _define_property(this, "compiler", void 0);
87
84
  this.opts = {
88
85
  filename,
89
86
  path: path2,
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { loadableReady } from "@loadable/component";
3
3
  import hoistNonReactStatics from "hoist-non-react-statics";
4
4
  import { parsedJSONFromElement } from "@modern-js/runtime-utils/parsed";
5
+ import { normalizePathname } from "@modern-js/runtime-utils/url";
5
6
  import { RenderLevel } from "./serverRender/types";
6
7
  import { WithCallback } from "./react/withCallback";
7
8
  import { formatClient, mockResponse, isReact18 } from "./utils";
@@ -28,7 +29,7 @@ const ssr = (config) => ({
28
29
  };
29
30
  const { ssrContext } = hydrateContext;
30
31
  const { pathname: initialPathname } = ssrContext.request;
31
- const currentPathname = window.location.pathname;
32
+ const currentPathname = normalizePathname(window.location.pathname);
32
33
  if (initialPathname !== currentPathname) {
33
34
  const errorMsg = `The initial URL ${initialPathname} and the URL ${currentPathname} to be hydrated do not match, reload.`;
34
35
  console.error(errorMsg);
@@ -1,4 +1,3 @@
1
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
2
1
  import withSideEffect from "react-side-effect";
3
2
  import React, { createElement } from "react";
4
3
  import { getOutermostProperty, aggKeysFromPropsList, exist, aggMatchesFromPropsList } from "./util";
@@ -49,8 +48,7 @@ const reducePropsToState = (propsList) => {
49
48
  return reduceProps;
50
49
  };
51
50
  function factory(Component) {
52
- var _React_Component;
53
- class Spr extends (_React_Component = React.Component) {
51
+ class Spr extends React.Component {
54
52
  static set canUseDOM(canUseDOM) {
55
53
  Component.canUseDOM = canUseDOM;
56
54
  }
@@ -74,12 +72,12 @@ function factory(Component) {
74
72
  });
75
73
  }
76
74
  }
77
- _define_property(Spr, "peek", Component.peek);
78
- _define_property(Spr, "rewind", Component.rewind);
79
- _define_property(Spr, "config", () => {
75
+ Spr.peek = Component.peek;
76
+ Spr.rewind = Component.rewind;
77
+ Spr.config = () => {
80
78
  const mappedState = Component.rewind();
81
79
  return mappedState;
82
- });
80
+ };
83
81
  return Spr;
84
82
  }
85
83
  const NullComponent = () => null;
@@ -1,4 +1,3 @@
1
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
2
1
  import React from "react";
3
2
  import { serializeJson } from "@modern-js/runtime-utils/node";
4
3
  import ReactHelmet from "react-helmet";
@@ -126,15 +125,6 @@ class Entry {
126
125
  return ssrDataScripts;
127
126
  }
128
127
  constructor(options) {
129
- _define_property(this, "entryName", void 0);
130
- _define_property(this, "result", void 0);
131
- _define_property(this, "tracker", void 0);
132
- _define_property(this, "template", void 0);
133
- _define_property(this, "App", void 0);
134
- _define_property(this, "pluginConfig", void 0);
135
- _define_property(this, "htmlModifiers", void 0);
136
- _define_property(this, "nonce", void 0);
137
- _define_property(this, "routeManifest", void 0);
138
128
  const { ctx, config } = options;
139
129
  const { entryName, template, nonce } = ctx;
140
130
  this.template = template;
@@ -1,4 +1,3 @@
1
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
2
1
  import { ChunkExtractor } from "@loadable/server";
3
2
  import { attributesToString, checkIsNode } from "../utils";
4
3
  const extname = (uri) => {
@@ -127,8 +126,6 @@ class LoadableCollector {
127
126
  };
128
127
  }
129
128
  constructor(options) {
130
- _define_property(this, "options", void 0);
131
- _define_property(this, "extractor", void 0);
132
129
  this.options = options;
133
130
  }
134
131
  }