@modern-js/ssg-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.
Files changed (2) hide show
  1. package/dist/index.js +20 -46
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -113716,10 +113716,14 @@ var require_chainId = __commonJS({
113716
113716
  SVG: "svg",
113717
113717
  /** Rule for pug */
113718
113718
  PUG: "pug",
113719
+ /** Rule for Vue */
113720
+ VUE: "vue",
113719
113721
  /** Rule for toml */
113720
113722
  TOML: "toml",
113721
113723
  /** Rule for yaml */
113722
113724
  YAML: "yaml",
113725
+ /** Rule for wasm */
113726
+ WASM: "wasm",
113723
113727
  /** Rule for bff */
113724
113728
  JS_BFF_API: "js-bff-api"
113725
113729
  },
@@ -113746,6 +113750,8 @@ var require_chainId = __commonJS({
113746
113750
  URL: "url",
113747
113751
  /** pug-loader */
113748
113752
  PUG: "pug",
113753
+ /** vue-loader */
113754
+ VUE: "vue",
113749
113755
  /** file-loader */
113750
113756
  FILE: "file",
113751
113757
  /** @svgr/webpack */
@@ -113815,12 +113821,16 @@ var require_chainId = __commonJS({
113815
113821
  BUNDLE_ANALYZER: "bundle-analyze",
113816
113822
  /** BottomTemplatePlugin */
113817
113823
  BOTTOM_TEMPLATE: "bottom-template",
113818
- /** HtmlCrossOriginPlugin */
113819
- HTML_CROSS_ORIGIN: "html-cross-origin",
113824
+ /** HtmlTagsPlugin */
113825
+ HTML_TAGS: "html-tags",
113820
113826
  /** HtmlNoncePlugin */
113821
113827
  HTML_NONCE: "html-nonce",
113828
+ /** HtmlCrossOriginPlugin */
113829
+ HTML_CROSS_ORIGIN: "html-cross-origin",
113822
113830
  /** MiniCssExtractPlugin */
113823
113831
  MINI_CSS_EXTRACT: "mini-css-extract",
113832
+ /** VueLoaderPlugin */
113833
+ VUE_LOADER_PLUGIN: "vue-loader-plugin",
113824
113834
  /** ReactFastRefreshPlugin */
113825
113835
  REACT_FAST_REFRESH: "react-fast-refresh",
113826
113836
  /** ProvidePlugin for node polyfill */
@@ -113834,9 +113844,7 @@ var require_chainId = __commonJS({
113834
113844
  /** HtmlAsyncChunkPlugin */
113835
113845
  HTML_ASYNC_CHUNK: "html-async-chunk",
113836
113846
  /** SWC_POLYFILL_CHECKER */
113837
- SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin",
113838
- /** HtmlTagsPlugin */
113839
- HTML_TAGS: "html-tags"
113847
+ SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin"
113840
113848
  },
113841
113849
  /** Predefined minimizers */
113842
113850
  MINIMIZER: {
@@ -114493,6 +114501,7 @@ var require_project = __commonJS({
114493
114501
  });
114494
114502
  var _interop_require_default = require_interop_require_default();
114495
114503
  var _path = /* @__PURE__ */ _interop_require_default._(require("path"));
114504
+ var _pkgup = /* @__PURE__ */ _interop_require_default._(require_pkg_up2());
114496
114505
  var _commands = require_commands();
114497
114506
  var _compiled = require_compiled();
114498
114507
  var _common = require_common2();
@@ -114532,8 +114541,10 @@ var require_project = __commonJS({
114532
114541
  return Boolean(options["web-only"]);
114533
114542
  });
114534
114543
  var isBeyondReact17 = (cwd) => {
114535
- const pkgPath = _path.default.join(cwd, "package.json");
114536
- if (!_compiled.fs.existsSync(pkgPath)) {
114544
+ const pkgPath = _pkgup.default.sync({
114545
+ cwd
114546
+ });
114547
+ if (!pkgPath) {
114537
114548
  return false;
114538
114549
  }
114539
114550
  const pkgInfo = JSON.parse(_compiled.fs.readFileSync(pkgPath, "utf8"));
@@ -114803,11 +114814,10 @@ var require_config3 = __commonJS({
114803
114814
  }
114804
114815
  });
114805
114816
  var _is = require_is();
114806
- var _constants = require_constants();
114807
- var getEntryOptions = (name, baseOptions, optionsByEntries, packageName) => {
114817
+ var getEntryOptions = (name, isMainEntry, baseOptions, optionsByEntries, packageName) => {
114808
114818
  if (optionsByEntries) {
114809
114819
  let optionsByEntry = getOptionsByEntryName(name, optionsByEntries);
114810
- if (optionsByEntry === void 0 && name === _constants.MAIN_ENTRY_NAME && packageName) {
114820
+ if (optionsByEntry === void 0 && isMainEntry && packageName) {
114811
114821
  optionsByEntry = getOptionsByEntryName(packageName, optionsByEntries);
114812
114822
  }
114813
114823
  return optionsByEntry !== void 0 ? (0, _is.isPlainObject)(optionsByEntry) && (0, _is.isPlainObject)(baseOptions) ? __spreadValues(__spreadValues({}, baseOptions), optionsByEntry) : optionsByEntry : baseOptions;
@@ -115808,41 +115818,6 @@ var require_require = __commonJS({
115808
115818
  }
115809
115819
  });
115810
115820
 
115811
- // ../../../toolkit/utils/dist/cjs/cli/routes.js
115812
- var require_routes = __commonJS({
115813
- "../../../toolkit/utils/dist/cjs/cli/routes.js"(exports) {
115814
- "use strict";
115815
- Object.defineProperty(exports, "__esModule", {
115816
- value: true
115817
- });
115818
- Object.defineProperty(exports, "getRouteId", {
115819
- enumerable: true,
115820
- get: function() {
115821
- return getRouteId;
115822
- }
115823
- });
115824
- var _interop_require_default = require_interop_require_default();
115825
- var _path = /* @__PURE__ */ _interop_require_default._(require("path"));
115826
- var _constants = require_constants();
115827
- var _path1 = require_path();
115828
- var getPathWithoutExt = (filename) => {
115829
- const extname = _path.default.extname(filename);
115830
- return filename.slice(0, -extname.length);
115831
- };
115832
- var getRouteId = (componentPath, routesDir, entryName) => {
115833
- const relativePath = (0, _path1.normalizeToPosixPath)(_path.default.relative(routesDir, componentPath));
115834
- const pathWithoutExt = getPathWithoutExt(relativePath);
115835
- let id = ``;
115836
- if (entryName === _constants.MAIN_ENTRY_NAME) {
115837
- id = pathWithoutExt;
115838
- } else {
115839
- id = `${entryName}_${pathWithoutExt}`;
115840
- }
115841
- return id.replace(/\[(.*?)\]/g, "($1)");
115842
- };
115843
- }
115844
- });
115845
-
115846
115821
  // ../../../toolkit/utils/dist/cjs/cli/runtimeExports.js
115847
115822
  var require_runtimeExports = __commonJS({
115848
115823
  "../../../toolkit/utils/dist/cjs/cli/runtimeExports.js"(exports) {
@@ -115989,7 +115964,6 @@ var require_cli = __commonJS({
115989
115964
  _export_star._(require_prettyInstructions(), exports);
115990
115965
  _export_star._(require_print(), exports);
115991
115966
  _export_star._(require_require(), exports);
115992
- _export_star._(require_routes(), exports);
115993
115967
  _export_star._(require_runtimeExports(), exports);
115994
115968
  _export_star._(require_watch(), exports);
115995
115969
  }
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.1.22",
18
+ "version": "3.1.24",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -29,12 +29,12 @@
29
29
  "@types/node": "^14",
30
30
  "jest": "^29",
31
31
  "typescript": "^5",
32
- "@modern-js/generator-common": "3.1.22",
33
- "@modern-js/plugin-i18n": "2.23.0",
34
- "@modern-js/dependence-generator": "3.1.22",
35
- "@modern-js/generator-utils": "3.1.22",
36
- "@scripts/jest-config": "2.23.0",
37
- "@scripts/build": "2.23.0"
32
+ "@modern-js/generator-utils": "3.1.24",
33
+ "@modern-js/generator-common": "3.1.24",
34
+ "@modern-js/dependence-generator": "3.1.24",
35
+ "@modern-js/plugin-i18n": "2.24.0",
36
+ "@scripts/jest-config": "2.24.0",
37
+ "@scripts/build": "2.24.0"
38
38
  },
39
39
  "sideEffects": false,
40
40
  "publishConfig": {