@modern-js/entry-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 +7 -7
package/dist/index.js
CHANGED
|
@@ -35121,10 +35121,14 @@ var require_chainId = __commonJS({
|
|
|
35121
35121
|
SVG: "svg",
|
|
35122
35122
|
/** Rule for pug */
|
|
35123
35123
|
PUG: "pug",
|
|
35124
|
+
/** Rule for Vue */
|
|
35125
|
+
VUE: "vue",
|
|
35124
35126
|
/** Rule for toml */
|
|
35125
35127
|
TOML: "toml",
|
|
35126
35128
|
/** Rule for yaml */
|
|
35127
35129
|
YAML: "yaml",
|
|
35130
|
+
/** Rule for wasm */
|
|
35131
|
+
WASM: "wasm",
|
|
35128
35132
|
/** Rule for bff */
|
|
35129
35133
|
JS_BFF_API: "js-bff-api"
|
|
35130
35134
|
},
|
|
@@ -35151,6 +35155,8 @@ var require_chainId = __commonJS({
|
|
|
35151
35155
|
URL: "url",
|
|
35152
35156
|
/** pug-loader */
|
|
35153
35157
|
PUG: "pug",
|
|
35158
|
+
/** vue-loader */
|
|
35159
|
+
VUE: "vue",
|
|
35154
35160
|
/** file-loader */
|
|
35155
35161
|
FILE: "file",
|
|
35156
35162
|
/** @svgr/webpack */
|
|
@@ -35220,12 +35226,16 @@ var require_chainId = __commonJS({
|
|
|
35220
35226
|
BUNDLE_ANALYZER: "bundle-analyze",
|
|
35221
35227
|
/** BottomTemplatePlugin */
|
|
35222
35228
|
BOTTOM_TEMPLATE: "bottom-template",
|
|
35223
|
-
/**
|
|
35224
|
-
|
|
35229
|
+
/** HtmlTagsPlugin */
|
|
35230
|
+
HTML_TAGS: "html-tags",
|
|
35225
35231
|
/** HtmlNoncePlugin */
|
|
35226
35232
|
HTML_NONCE: "html-nonce",
|
|
35233
|
+
/** HtmlCrossOriginPlugin */
|
|
35234
|
+
HTML_CROSS_ORIGIN: "html-cross-origin",
|
|
35227
35235
|
/** MiniCssExtractPlugin */
|
|
35228
35236
|
MINI_CSS_EXTRACT: "mini-css-extract",
|
|
35237
|
+
/** VueLoaderPlugin */
|
|
35238
|
+
VUE_LOADER_PLUGIN: "vue-loader-plugin",
|
|
35229
35239
|
/** ReactFastRefreshPlugin */
|
|
35230
35240
|
REACT_FAST_REFRESH: "react-fast-refresh",
|
|
35231
35241
|
/** ProvidePlugin for node polyfill */
|
|
@@ -35239,9 +35249,7 @@ var require_chainId = __commonJS({
|
|
|
35239
35249
|
/** HtmlAsyncChunkPlugin */
|
|
35240
35250
|
HTML_ASYNC_CHUNK: "html-async-chunk",
|
|
35241
35251
|
/** SWC_POLYFILL_CHECKER */
|
|
35242
|
-
SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin"
|
|
35243
|
-
/** HtmlTagsPlugin */
|
|
35244
|
-
HTML_TAGS: "html-tags"
|
|
35252
|
+
SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin"
|
|
35245
35253
|
},
|
|
35246
35254
|
/** Predefined minimizers */
|
|
35247
35255
|
MINIMIZER: {
|
|
@@ -35898,6 +35906,7 @@ var require_project = __commonJS({
|
|
|
35898
35906
|
});
|
|
35899
35907
|
var _interop_require_default = require_interop_require_default();
|
|
35900
35908
|
var _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
|
35909
|
+
var _pkgup = /* @__PURE__ */ _interop_require_default._(require_pkg_up());
|
|
35901
35910
|
var _commands = require_commands();
|
|
35902
35911
|
var _compiled = require_compiled();
|
|
35903
35912
|
var _common = require_common();
|
|
@@ -35937,8 +35946,10 @@ var require_project = __commonJS({
|
|
|
35937
35946
|
return Boolean(options["web-only"]);
|
|
35938
35947
|
});
|
|
35939
35948
|
var isBeyondReact17 = (cwd) => {
|
|
35940
|
-
const pkgPath =
|
|
35941
|
-
|
|
35949
|
+
const pkgPath = _pkgup.default.sync({
|
|
35950
|
+
cwd
|
|
35951
|
+
});
|
|
35952
|
+
if (!pkgPath) {
|
|
35942
35953
|
return false;
|
|
35943
35954
|
}
|
|
35944
35955
|
const pkgInfo = JSON.parse(_compiled.fs.readFileSync(pkgPath, "utf8"));
|
|
@@ -36208,11 +36219,10 @@ var require_config2 = __commonJS({
|
|
|
36208
36219
|
}
|
|
36209
36220
|
});
|
|
36210
36221
|
var _is = require_is();
|
|
36211
|
-
var
|
|
36212
|
-
var getEntryOptions = (name, baseOptions, optionsByEntries, packageName) => {
|
|
36222
|
+
var getEntryOptions = (name, isMainEntry, baseOptions, optionsByEntries, packageName) => {
|
|
36213
36223
|
if (optionsByEntries) {
|
|
36214
36224
|
let optionsByEntry = getOptionsByEntryName(name, optionsByEntries);
|
|
36215
|
-
if (optionsByEntry === void 0 &&
|
|
36225
|
+
if (optionsByEntry === void 0 && isMainEntry && packageName) {
|
|
36216
36226
|
optionsByEntry = getOptionsByEntryName(packageName, optionsByEntries);
|
|
36217
36227
|
}
|
|
36218
36228
|
return optionsByEntry !== void 0 ? (0, _is.isPlainObject)(optionsByEntry) && (0, _is.isPlainObject)(baseOptions) ? __spreadValues(__spreadValues({}, baseOptions), optionsByEntry) : optionsByEntry : baseOptions;
|
|
@@ -37213,41 +37223,6 @@ var require_require = __commonJS({
|
|
|
37213
37223
|
}
|
|
37214
37224
|
});
|
|
37215
37225
|
|
|
37216
|
-
// ../../../toolkit/utils/dist/cjs/cli/routes.js
|
|
37217
|
-
var require_routes = __commonJS({
|
|
37218
|
-
"../../../toolkit/utils/dist/cjs/cli/routes.js"(exports) {
|
|
37219
|
-
"use strict";
|
|
37220
|
-
Object.defineProperty(exports, "__esModule", {
|
|
37221
|
-
value: true
|
|
37222
|
-
});
|
|
37223
|
-
Object.defineProperty(exports, "getRouteId", {
|
|
37224
|
-
enumerable: true,
|
|
37225
|
-
get: function() {
|
|
37226
|
-
return getRouteId;
|
|
37227
|
-
}
|
|
37228
|
-
});
|
|
37229
|
-
var _interop_require_default = require_interop_require_default();
|
|
37230
|
-
var _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
|
37231
|
-
var _constants = require_constants();
|
|
37232
|
-
var _path1 = require_path();
|
|
37233
|
-
var getPathWithoutExt = (filename) => {
|
|
37234
|
-
const extname = _path.default.extname(filename);
|
|
37235
|
-
return filename.slice(0, -extname.length);
|
|
37236
|
-
};
|
|
37237
|
-
var getRouteId = (componentPath, routesDir, entryName) => {
|
|
37238
|
-
const relativePath = (0, _path1.normalizeToPosixPath)(_path.default.relative(routesDir, componentPath));
|
|
37239
|
-
const pathWithoutExt = getPathWithoutExt(relativePath);
|
|
37240
|
-
let id = ``;
|
|
37241
|
-
if (entryName === _constants.MAIN_ENTRY_NAME) {
|
|
37242
|
-
id = pathWithoutExt;
|
|
37243
|
-
} else {
|
|
37244
|
-
id = `${entryName}_${pathWithoutExt}`;
|
|
37245
|
-
}
|
|
37246
|
-
return id.replace(/\[(.*?)\]/g, "($1)");
|
|
37247
|
-
};
|
|
37248
|
-
}
|
|
37249
|
-
});
|
|
37250
|
-
|
|
37251
37226
|
// ../../../toolkit/utils/dist/cjs/cli/runtimeExports.js
|
|
37252
37227
|
var require_runtimeExports = __commonJS({
|
|
37253
37228
|
"../../../toolkit/utils/dist/cjs/cli/runtimeExports.js"(exports) {
|
|
@@ -37394,7 +37369,6 @@ var require_cli = __commonJS({
|
|
|
37394
37369
|
_export_star._(require_prettyInstructions(), exports);
|
|
37395
37370
|
_export_star._(require_print(), exports);
|
|
37396
37371
|
_export_star._(require_require(), exports);
|
|
37397
|
-
_export_star._(require_routes(), exports);
|
|
37398
37372
|
_export_star._(require_runtimeExports(), exports);
|
|
37399
37373
|
_export_star._(require_watch(), exports);
|
|
37400
37374
|
}
|
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
|
"main": "./dist/index.js",
|
|
21
21
|
"files": [
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"@types/node": "^14",
|
|
31
31
|
"jest": "^29",
|
|
32
32
|
"typescript": "^5",
|
|
33
|
-
"@modern-js/generator-common": "3.1.
|
|
34
|
-
"@modern-js/utils": "2.
|
|
35
|
-
"@modern-js/
|
|
36
|
-
"@modern-js/
|
|
37
|
-
"@scripts/
|
|
38
|
-
"@scripts/
|
|
33
|
+
"@modern-js/generator-common": "3.1.24",
|
|
34
|
+
"@modern-js/utils": "2.24.0",
|
|
35
|
+
"@modern-js/generator-utils": "3.1.24",
|
|
36
|
+
"@modern-js/plugin-i18n": "2.24.0",
|
|
37
|
+
"@scripts/jest-config": "2.24.0",
|
|
38
|
+
"@scripts/build": "2.24.0"
|
|
39
39
|
},
|
|
40
40
|
"sideEffects": false,
|
|
41
41
|
"publishConfig": {
|