@unpackjs/plugin-react 3.3.3 → 3.3.4

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 CHANGED
@@ -1,8 +1,9 @@
1
1
  import __rslib_shim_module__ from 'module';
2
2
  let require = __rslib_shim_module__.createRequire(import.meta.url);
3
3
  import { fileURLToPath as __rspack_fileURLToPath } from "node:url";
4
+ import node_path, { dirname as __rspack_dirname } from "node:path";
4
5
  import plugin_react_refresh from "@rspack/plugin-react-refresh";
5
- import { TEMPLATE_CONTENT, addRestartCleaner, colors, esVersionToBrowserslist, getPathInJs, getPort, isDev, isDevServer, isFunction, isPlainObject, launchEditor, logger, mergeConfig as core_mergeConfig, removeDir, rspack } from "@unpackjs/core";
6
+ import { TEMPLATE_CONTENT, addRestartCleaner, esVersionToBrowserslist, getPathInJs, getPort, isDev, isDevServer, isFunction, isPlainObject, launchEditor, mergeConfig as core_mergeConfig, removeDir, rspack } from "@unpackjs/core";
6
7
  import node_fs from "node:fs";
7
8
  import node_http from "node:http";
8
9
  var click_to_component_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
@@ -55,7 +56,7 @@ import '${getPathInJs(node_path.resolve(Object.values(config.entry)[0]))}'
55
56
  bundlerConfig: async (originalConfig, { unpackConfig, mergeConfig, cachePath })=>{
56
57
  let config = originalConfig;
57
58
  unpackConfig.mpa && (config = (({ config, unpackConfig, cachePath })=>{
58
- let start, entry, html, pagesRoot, tempDirectory = node_path.join(cachePath, 'mpa'), userOptions = isPlainObject(unpackConfig.mpa) ? unpackConfig.mpa : {}, { entry: entry1, html: html1 } = (start = performance.now(), entry = {}, html = [], pagesRoot = node_path.join(unpackConfig.root, 'src', 'pages'), node_fs.readdirSync(pagesRoot).forEach((filename)=>{
59
+ let entry, html, pagesRoot, tempDirectory = node_path.join(cachePath, 'mpa'), userOptions = isPlainObject(unpackConfig.mpa) ? unpackConfig.mpa : {}, { entry: entry1, html: html1 } = (entry = {}, html = [], pagesRoot = node_path.join(unpackConfig.root, 'src', 'pages'), node_fs.readdirSync(pagesRoot).forEach((filename)=>{
59
60
  if (filename.startsWith('.')) return;
60
61
  let indexFilePath = ((dir)=>{
61
62
  for (let extension of [
@@ -93,7 +94,7 @@ import '${getPathInJs(node_path.resolve(Object.values(config.entry)[0]))}'
93
94
  }
94
95
  });
95
96
  }
96
- }), isDevServer() || logger.info(`collect entries in ${(performance.now() - start).toFixed(2)}ms ${colors.dim('[MPA]')}`), {
97
+ }), {
97
98
  entry,
98
99
  html
99
100
  });
@@ -208,5 +209,4 @@ ${renderer}
208
209
  }
209
210
  };
210
211
  };
211
- import node_path, { dirname as __rspack_dirname } from "node:path";
212
212
  export { PLUGIN_NAME, pluginReact };
@@ -1 +1 @@
1
- {"version":3,"file":"mpa.d.ts","sourceRoot":"","sources":["../src/mpa.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,oBAAoB,EAWzB,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAA;AAYvB,eAAO,MAAM,cAAc,GAAI,sCAI5B;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;CAClB,KAAG,oBA2GH,CAAA"}
1
+ {"version":3,"file":"mpa.d.ts","sourceRoot":"","sources":["../src/mpa.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,oBAAoB,EAQzB,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAA;AAYvB,eAAO,MAAM,cAAc,GAAI,sCAI5B;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;CAClB,KAAG,oBAsGH,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unpackjs/plugin-react",
3
- "version": "3.3.3",
3
+ "version": "3.3.4",
4
4
  "description": "React plugin for Unpack",
5
5
  "type": "module",
6
6
  "exports": {
@@ -28,7 +28,7 @@
28
28
  "react-refresh": "0.18.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@unpackjs/core": "3.7.4"
31
+ "@unpackjs/core": "3.7.7"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@unpackjs/core": "3.x"