@modern-js/server-generator 3.1.22 → 3.1.24
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/dist/index.js +20 -46
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -35114,10 +35114,14 @@ var require_chainId = __commonJS({
|
|
|
35114
35114
|
SVG: "svg",
|
|
35115
35115
|
/** Rule for pug */
|
|
35116
35116
|
PUG: "pug",
|
|
35117
|
+
/** Rule for Vue */
|
|
35118
|
+
VUE: "vue",
|
|
35117
35119
|
/** Rule for toml */
|
|
35118
35120
|
TOML: "toml",
|
|
35119
35121
|
/** Rule for yaml */
|
|
35120
35122
|
YAML: "yaml",
|
|
35123
|
+
/** Rule for wasm */
|
|
35124
|
+
WASM: "wasm",
|
|
35121
35125
|
/** Rule for bff */
|
|
35122
35126
|
JS_BFF_API: "js-bff-api"
|
|
35123
35127
|
},
|
|
@@ -35144,6 +35148,8 @@ var require_chainId = __commonJS({
|
|
|
35144
35148
|
URL: "url",
|
|
35145
35149
|
/** pug-loader */
|
|
35146
35150
|
PUG: "pug",
|
|
35151
|
+
/** vue-loader */
|
|
35152
|
+
VUE: "vue",
|
|
35147
35153
|
/** file-loader */
|
|
35148
35154
|
FILE: "file",
|
|
35149
35155
|
/** @svgr/webpack */
|
|
@@ -35213,12 +35219,16 @@ var require_chainId = __commonJS({
|
|
|
35213
35219
|
BUNDLE_ANALYZER: "bundle-analyze",
|
|
35214
35220
|
/** BottomTemplatePlugin */
|
|
35215
35221
|
BOTTOM_TEMPLATE: "bottom-template",
|
|
35216
|
-
/**
|
|
35217
|
-
|
|
35222
|
+
/** HtmlTagsPlugin */
|
|
35223
|
+
HTML_TAGS: "html-tags",
|
|
35218
35224
|
/** HtmlNoncePlugin */
|
|
35219
35225
|
HTML_NONCE: "html-nonce",
|
|
35226
|
+
/** HtmlCrossOriginPlugin */
|
|
35227
|
+
HTML_CROSS_ORIGIN: "html-cross-origin",
|
|
35220
35228
|
/** MiniCssExtractPlugin */
|
|
35221
35229
|
MINI_CSS_EXTRACT: "mini-css-extract",
|
|
35230
|
+
/** VueLoaderPlugin */
|
|
35231
|
+
VUE_LOADER_PLUGIN: "vue-loader-plugin",
|
|
35222
35232
|
/** ReactFastRefreshPlugin */
|
|
35223
35233
|
REACT_FAST_REFRESH: "react-fast-refresh",
|
|
35224
35234
|
/** ProvidePlugin for node polyfill */
|
|
@@ -35232,9 +35242,7 @@ var require_chainId = __commonJS({
|
|
|
35232
35242
|
/** HtmlAsyncChunkPlugin */
|
|
35233
35243
|
HTML_ASYNC_CHUNK: "html-async-chunk",
|
|
35234
35244
|
/** SWC_POLYFILL_CHECKER */
|
|
35235
|
-
SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin"
|
|
35236
|
-
/** HtmlTagsPlugin */
|
|
35237
|
-
HTML_TAGS: "html-tags"
|
|
35245
|
+
SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin"
|
|
35238
35246
|
},
|
|
35239
35247
|
/** Predefined minimizers */
|
|
35240
35248
|
MINIMIZER: {
|
|
@@ -35891,6 +35899,7 @@ var require_project = __commonJS({
|
|
|
35891
35899
|
});
|
|
35892
35900
|
var _interop_require_default = require_interop_require_default();
|
|
35893
35901
|
var _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
|
35902
|
+
var _pkgup = /* @__PURE__ */ _interop_require_default._(require_pkg_up());
|
|
35894
35903
|
var _commands = require_commands();
|
|
35895
35904
|
var _compiled = require_compiled();
|
|
35896
35905
|
var _common = require_common();
|
|
@@ -35930,8 +35939,10 @@ var require_project = __commonJS({
|
|
|
35930
35939
|
return Boolean(options["web-only"]);
|
|
35931
35940
|
});
|
|
35932
35941
|
var isBeyondReact17 = (cwd) => {
|
|
35933
|
-
const pkgPath =
|
|
35934
|
-
|
|
35942
|
+
const pkgPath = _pkgup.default.sync({
|
|
35943
|
+
cwd
|
|
35944
|
+
});
|
|
35945
|
+
if (!pkgPath) {
|
|
35935
35946
|
return false;
|
|
35936
35947
|
}
|
|
35937
35948
|
const pkgInfo = JSON.parse(_compiled.fs.readFileSync(pkgPath, "utf8"));
|
|
@@ -36201,11 +36212,10 @@ var require_config2 = __commonJS({
|
|
|
36201
36212
|
}
|
|
36202
36213
|
});
|
|
36203
36214
|
var _is = require_is();
|
|
36204
|
-
var
|
|
36205
|
-
var getEntryOptions = (name, baseOptions, optionsByEntries, packageName) => {
|
|
36215
|
+
var getEntryOptions = (name, isMainEntry, baseOptions, optionsByEntries, packageName) => {
|
|
36206
36216
|
if (optionsByEntries) {
|
|
36207
36217
|
let optionsByEntry = getOptionsByEntryName(name, optionsByEntries);
|
|
36208
|
-
if (optionsByEntry === void 0 &&
|
|
36218
|
+
if (optionsByEntry === void 0 && isMainEntry && packageName) {
|
|
36209
36219
|
optionsByEntry = getOptionsByEntryName(packageName, optionsByEntries);
|
|
36210
36220
|
}
|
|
36211
36221
|
return optionsByEntry !== void 0 ? (0, _is.isPlainObject)(optionsByEntry) && (0, _is.isPlainObject)(baseOptions) ? __spreadValues(__spreadValues({}, baseOptions), optionsByEntry) : optionsByEntry : baseOptions;
|
|
@@ -37206,41 +37216,6 @@ var require_require = __commonJS({
|
|
|
37206
37216
|
}
|
|
37207
37217
|
});
|
|
37208
37218
|
|
|
37209
|
-
// ../../../toolkit/utils/dist/cjs/cli/routes.js
|
|
37210
|
-
var require_routes = __commonJS({
|
|
37211
|
-
"../../../toolkit/utils/dist/cjs/cli/routes.js"(exports) {
|
|
37212
|
-
"use strict";
|
|
37213
|
-
Object.defineProperty(exports, "__esModule", {
|
|
37214
|
-
value: true
|
|
37215
|
-
});
|
|
37216
|
-
Object.defineProperty(exports, "getRouteId", {
|
|
37217
|
-
enumerable: true,
|
|
37218
|
-
get: function() {
|
|
37219
|
-
return getRouteId;
|
|
37220
|
-
}
|
|
37221
|
-
});
|
|
37222
|
-
var _interop_require_default = require_interop_require_default();
|
|
37223
|
-
var _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
|
37224
|
-
var _constants = require_constants();
|
|
37225
|
-
var _path1 = require_path();
|
|
37226
|
-
var getPathWithoutExt = (filename) => {
|
|
37227
|
-
const extname = _path.default.extname(filename);
|
|
37228
|
-
return filename.slice(0, -extname.length);
|
|
37229
|
-
};
|
|
37230
|
-
var getRouteId = (componentPath, routesDir, entryName) => {
|
|
37231
|
-
const relativePath = (0, _path1.normalizeToPosixPath)(_path.default.relative(routesDir, componentPath));
|
|
37232
|
-
const pathWithoutExt = getPathWithoutExt(relativePath);
|
|
37233
|
-
let id = ``;
|
|
37234
|
-
if (entryName === _constants.MAIN_ENTRY_NAME) {
|
|
37235
|
-
id = pathWithoutExt;
|
|
37236
|
-
} else {
|
|
37237
|
-
id = `${entryName}_${pathWithoutExt}`;
|
|
37238
|
-
}
|
|
37239
|
-
return id.replace(/\[(.*?)\]/g, "($1)");
|
|
37240
|
-
};
|
|
37241
|
-
}
|
|
37242
|
-
});
|
|
37243
|
-
|
|
37244
37219
|
// ../../../toolkit/utils/dist/cjs/cli/runtimeExports.js
|
|
37245
37220
|
var require_runtimeExports = __commonJS({
|
|
37246
37221
|
"../../../toolkit/utils/dist/cjs/cli/runtimeExports.js"(exports) {
|
|
@@ -37387,7 +37362,6 @@ var require_cli = __commonJS({
|
|
|
37387
37362
|
_export_star._(require_prettyInstructions(), exports);
|
|
37388
37363
|
_export_star._(require_print(), exports);
|
|
37389
37364
|
_export_star._(require_require(), exports);
|
|
37390
|
-
_export_star._(require_routes(), exports);
|
|
37391
37365
|
_export_star._(require_runtimeExports(), exports);
|
|
37392
37366
|
_export_star._(require_watch(), exports);
|
|
37393
37367
|
}
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.1.
|
|
18
|
+
"version": "3.1.24",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./src/index.ts",
|
|
21
21
|
"main": "./dist/index.js",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"@types/node": "^14",
|
|
32
32
|
"jest": "^29",
|
|
33
33
|
"typescript": "^5",
|
|
34
|
-
"@modern-js/generator-common": "3.1.
|
|
35
|
-
"@
|
|
36
|
-
"@modern-js/
|
|
37
|
-
"@scripts/build": "2.
|
|
38
|
-
"@
|
|
34
|
+
"@modern-js/generator-common": "3.1.24",
|
|
35
|
+
"@modern-js/dependence-generator": "3.1.24",
|
|
36
|
+
"@modern-js/generator-utils": "3.1.24",
|
|
37
|
+
"@scripts/build": "2.24.0",
|
|
38
|
+
"@scripts/jest-config": "2.24.0"
|
|
39
39
|
},
|
|
40
40
|
"sideEffects": false,
|
|
41
41
|
"publishConfig": {
|