@modern-js/base-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 +5 -5
package/dist/index.js
CHANGED
|
@@ -113735,10 +113735,14 @@ var require_chainId = __commonJS({
|
|
|
113735
113735
|
SVG: "svg",
|
|
113736
113736
|
/** Rule for pug */
|
|
113737
113737
|
PUG: "pug",
|
|
113738
|
+
/** Rule for Vue */
|
|
113739
|
+
VUE: "vue",
|
|
113738
113740
|
/** Rule for toml */
|
|
113739
113741
|
TOML: "toml",
|
|
113740
113742
|
/** Rule for yaml */
|
|
113741
113743
|
YAML: "yaml",
|
|
113744
|
+
/** Rule for wasm */
|
|
113745
|
+
WASM: "wasm",
|
|
113742
113746
|
/** Rule for bff */
|
|
113743
113747
|
JS_BFF_API: "js-bff-api"
|
|
113744
113748
|
},
|
|
@@ -113765,6 +113769,8 @@ var require_chainId = __commonJS({
|
|
|
113765
113769
|
URL: "url",
|
|
113766
113770
|
/** pug-loader */
|
|
113767
113771
|
PUG: "pug",
|
|
113772
|
+
/** vue-loader */
|
|
113773
|
+
VUE: "vue",
|
|
113768
113774
|
/** file-loader */
|
|
113769
113775
|
FILE: "file",
|
|
113770
113776
|
/** @svgr/webpack */
|
|
@@ -113834,12 +113840,16 @@ var require_chainId = __commonJS({
|
|
|
113834
113840
|
BUNDLE_ANALYZER: "bundle-analyze",
|
|
113835
113841
|
/** BottomTemplatePlugin */
|
|
113836
113842
|
BOTTOM_TEMPLATE: "bottom-template",
|
|
113837
|
-
/**
|
|
113838
|
-
|
|
113843
|
+
/** HtmlTagsPlugin */
|
|
113844
|
+
HTML_TAGS: "html-tags",
|
|
113839
113845
|
/** HtmlNoncePlugin */
|
|
113840
113846
|
HTML_NONCE: "html-nonce",
|
|
113847
|
+
/** HtmlCrossOriginPlugin */
|
|
113848
|
+
HTML_CROSS_ORIGIN: "html-cross-origin",
|
|
113841
113849
|
/** MiniCssExtractPlugin */
|
|
113842
113850
|
MINI_CSS_EXTRACT: "mini-css-extract",
|
|
113851
|
+
/** VueLoaderPlugin */
|
|
113852
|
+
VUE_LOADER_PLUGIN: "vue-loader-plugin",
|
|
113843
113853
|
/** ReactFastRefreshPlugin */
|
|
113844
113854
|
REACT_FAST_REFRESH: "react-fast-refresh",
|
|
113845
113855
|
/** ProvidePlugin for node polyfill */
|
|
@@ -113853,9 +113863,7 @@ var require_chainId = __commonJS({
|
|
|
113853
113863
|
/** HtmlAsyncChunkPlugin */
|
|
113854
113864
|
HTML_ASYNC_CHUNK: "html-async-chunk",
|
|
113855
113865
|
/** SWC_POLYFILL_CHECKER */
|
|
113856
|
-
SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin"
|
|
113857
|
-
/** HtmlTagsPlugin */
|
|
113858
|
-
HTML_TAGS: "html-tags"
|
|
113866
|
+
SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin"
|
|
113859
113867
|
},
|
|
113860
113868
|
/** Predefined minimizers */
|
|
113861
113869
|
MINIMIZER: {
|
|
@@ -114512,6 +114520,7 @@ var require_project = __commonJS({
|
|
|
114512
114520
|
});
|
|
114513
114521
|
var _interop_require_default = require_interop_require_default();
|
|
114514
114522
|
var _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
|
114523
|
+
var _pkgup = /* @__PURE__ */ _interop_require_default._(require_pkg_up2());
|
|
114515
114524
|
var _commands = require_commands();
|
|
114516
114525
|
var _compiled = require_compiled();
|
|
114517
114526
|
var _common = require_common2();
|
|
@@ -114551,8 +114560,10 @@ var require_project = __commonJS({
|
|
|
114551
114560
|
return Boolean(options["web-only"]);
|
|
114552
114561
|
});
|
|
114553
114562
|
var isBeyondReact17 = (cwd) => {
|
|
114554
|
-
const pkgPath =
|
|
114555
|
-
|
|
114563
|
+
const pkgPath = _pkgup.default.sync({
|
|
114564
|
+
cwd
|
|
114565
|
+
});
|
|
114566
|
+
if (!pkgPath) {
|
|
114556
114567
|
return false;
|
|
114557
114568
|
}
|
|
114558
114569
|
const pkgInfo = JSON.parse(_compiled.fs.readFileSync(pkgPath, "utf8"));
|
|
@@ -114822,11 +114833,10 @@ var require_config3 = __commonJS({
|
|
|
114822
114833
|
}
|
|
114823
114834
|
});
|
|
114824
114835
|
var _is = require_is();
|
|
114825
|
-
var
|
|
114826
|
-
var getEntryOptions = (name, baseOptions, optionsByEntries, packageName) => {
|
|
114836
|
+
var getEntryOptions = (name, isMainEntry, baseOptions, optionsByEntries, packageName) => {
|
|
114827
114837
|
if (optionsByEntries) {
|
|
114828
114838
|
let optionsByEntry = getOptionsByEntryName(name, optionsByEntries);
|
|
114829
|
-
if (optionsByEntry === void 0 &&
|
|
114839
|
+
if (optionsByEntry === void 0 && isMainEntry && packageName) {
|
|
114830
114840
|
optionsByEntry = getOptionsByEntryName(packageName, optionsByEntries);
|
|
114831
114841
|
}
|
|
114832
114842
|
return optionsByEntry !== void 0 ? (0, _is.isPlainObject)(optionsByEntry) && (0, _is.isPlainObject)(baseOptions) ? __spreadValues(__spreadValues({}, baseOptions), optionsByEntry) : optionsByEntry : baseOptions;
|
|
@@ -115827,41 +115837,6 @@ var require_require = __commonJS({
|
|
|
115827
115837
|
}
|
|
115828
115838
|
});
|
|
115829
115839
|
|
|
115830
|
-
// ../../../toolkit/utils/dist/cjs/cli/routes.js
|
|
115831
|
-
var require_routes = __commonJS({
|
|
115832
|
-
"../../../toolkit/utils/dist/cjs/cli/routes.js"(exports) {
|
|
115833
|
-
"use strict";
|
|
115834
|
-
Object.defineProperty(exports, "__esModule", {
|
|
115835
|
-
value: true
|
|
115836
|
-
});
|
|
115837
|
-
Object.defineProperty(exports, "getRouteId", {
|
|
115838
|
-
enumerable: true,
|
|
115839
|
-
get: function() {
|
|
115840
|
-
return getRouteId;
|
|
115841
|
-
}
|
|
115842
|
-
});
|
|
115843
|
-
var _interop_require_default = require_interop_require_default();
|
|
115844
|
-
var _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
|
115845
|
-
var _constants = require_constants();
|
|
115846
|
-
var _path1 = require_path();
|
|
115847
|
-
var getPathWithoutExt = (filename) => {
|
|
115848
|
-
const extname = _path.default.extname(filename);
|
|
115849
|
-
return filename.slice(0, -extname.length);
|
|
115850
|
-
};
|
|
115851
|
-
var getRouteId = (componentPath, routesDir, entryName) => {
|
|
115852
|
-
const relativePath = (0, _path1.normalizeToPosixPath)(_path.default.relative(routesDir, componentPath));
|
|
115853
|
-
const pathWithoutExt = getPathWithoutExt(relativePath);
|
|
115854
|
-
let id = ``;
|
|
115855
|
-
if (entryName === _constants.MAIN_ENTRY_NAME) {
|
|
115856
|
-
id = pathWithoutExt;
|
|
115857
|
-
} else {
|
|
115858
|
-
id = `${entryName}_${pathWithoutExt}`;
|
|
115859
|
-
}
|
|
115860
|
-
return id.replace(/\[(.*?)\]/g, "($1)");
|
|
115861
|
-
};
|
|
115862
|
-
}
|
|
115863
|
-
});
|
|
115864
|
-
|
|
115865
115840
|
// ../../../toolkit/utils/dist/cjs/cli/runtimeExports.js
|
|
115866
115841
|
var require_runtimeExports = __commonJS({
|
|
115867
115842
|
"../../../toolkit/utils/dist/cjs/cli/runtimeExports.js"(exports) {
|
|
@@ -116008,7 +115983,6 @@ var require_cli = __commonJS({
|
|
|
116008
115983
|
_export_star._(require_prettyInstructions(), exports);
|
|
116009
115984
|
_export_star._(require_print(), exports);
|
|
116010
115985
|
_export_star._(require_require(), exports);
|
|
116011
|
-
_export_star._(require_routes(), exports);
|
|
116012
115986
|
_export_star._(require_runtimeExports(), exports);
|
|
116013
115987
|
_export_star._(require_watch(), exports);
|
|
116014
115988
|
}
|
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",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"@types/node": "^14",
|
|
31
31
|
"jest": "^29",
|
|
32
32
|
"typescript": "^5",
|
|
33
|
-
"@modern-js/generator-common": "3.1.
|
|
34
|
-
"@modern-js/generator-utils": "3.1.
|
|
35
|
-
"@scripts/build": "2.
|
|
36
|
-
"@scripts/jest-config": "2.
|
|
33
|
+
"@modern-js/generator-common": "3.1.24",
|
|
34
|
+
"@modern-js/generator-utils": "3.1.24",
|
|
35
|
+
"@scripts/build": "2.24.0",
|
|
36
|
+
"@scripts/jest-config": "2.24.0"
|
|
37
37
|
},
|
|
38
38
|
"sideEffects": false,
|
|
39
39
|
"publishConfig": {
|