@umijs/bundler-utoopack 4.6.67 → 4.6.68

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/config.d.ts CHANGED
@@ -9,7 +9,7 @@ export declare function getSSRUtooPackConfig(rawOpts: IOpts & {
9
9
  useHash?: boolean;
10
10
  isDev?: boolean;
11
11
  }): Promise<BundleOptions>;
12
- export declare type IDevOpts = {
12
+ export type IDevOpts = {
13
13
  afterMiddlewares?: any[];
14
14
  beforeMiddlewares?: any[];
15
15
  onDevCompileDone?: Function;
package/dist/config.js CHANGED
@@ -356,7 +356,8 @@ function getNormalizedAlias(alias, rootDir) {
356
356
  } catch (e) {
357
357
  }
358
358
  }
359
- if (!isDirectory) continue;
359
+ if (!isDirectory)
360
+ continue;
360
361
  }
361
362
  newAlias[`${key}/*`] = `${value}/*`;
362
363
  }
@@ -404,11 +405,13 @@ function toWildcardExternalConfig(value) {
404
405
  }
405
406
  }
406
407
  function getExternalSubPathGlob(externalKey) {
407
- if (!externalKey.includes("*")) return;
408
+ if (!externalKey.includes("*"))
409
+ return;
408
410
  const parts = externalKey.split("/");
409
411
  const packageName = externalKey.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0];
410
412
  const subPathGlob = externalKey.slice(packageName.length);
411
- if (!packageName || !subPathGlob.startsWith("/")) return;
413
+ if (!packageName || !subPathGlob.startsWith("/"))
414
+ return;
412
415
  return {
413
416
  packageName,
414
417
  subPathGlob
@@ -461,9 +464,11 @@ function getNormalizedExternals(externals) {
461
464
  );
462
465
  Object.entries(externals || {}).forEach(([k, v]) => {
463
466
  const externalSubPathGlob = getExternalSubPathGlob(k);
464
- if (!externalSubPathGlob) return;
467
+ if (!externalSubPathGlob)
468
+ return;
465
469
  const normalized = toWildcardExternalConfig(v);
466
- if (!normalized) return;
470
+ if (!normalized)
471
+ return;
467
472
  ret[externalSubPathGlob.packageName] = addWildcardSubPath(
468
473
  ret[externalSubPathGlob.packageName] && typeof ret[externalSubPathGlob.packageName] === "object" ? ret[externalSubPathGlob.packageName] : normalized,
469
474
  externalSubPathGlob.subPathGlob
@@ -715,6 +720,7 @@ async function getSSRUtooPackConfig(rawOpts) {
715
720
  target: "node",
716
721
  sourceMaps: false,
717
722
  stats: true,
723
+ pluginRuntimeStrategy: "childProcesses",
718
724
  nodePolyfill: false,
719
725
  optimization: {
720
726
  ...utooBundlerOpts.config.optimization,
package/dist/index.js CHANGED
@@ -207,7 +207,8 @@ async function dev(opts) {
207
207
  }
208
208
  const publicPathPrefix = (() => {
209
209
  const p = opts.config.publicPath;
210
- if (!p || p === "/" || p === "auto") return null;
210
+ if (!p || p === "/" || p === "auto")
211
+ return null;
211
212
  return p.startsWith("/") ? p : "/" + p;
212
213
  })();
213
214
  app.use(
package/dist/types.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import type { IOpts as IConfigOpts } from '@umijs/bundler-webpack';
2
2
  import type { ConfigComplete } from '@utoo/pack';
3
- export declare type IUtoopackUserConfig = ConfigComplete & {
3
+ export type IUtoopackUserConfig = ConfigComplete & {
4
4
  babelLoader?: boolean;
5
5
  root?: string;
6
6
  };
7
- export declare type IOpts = {
7
+ export type IOpts = {
8
8
  cwd: string;
9
9
  rootDir: string;
10
10
  entry: Record<string, string>;
package/dist/util.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { WebpackConfig } from '@utoo/pack';
2
- declare type IDevBannerOpts = {
2
+ type IDevBannerOpts = {
3
3
  duration?: number;
4
4
  host?: string;
5
5
  ip?: string;
@@ -7,7 +7,7 @@ declare type IDevBannerOpts = {
7
7
  port?: number;
8
8
  protocol: string;
9
9
  };
10
- declare type IBuildBannerOpts = {
10
+ type IBuildBannerOpts = {
11
11
  assetCount?: number;
12
12
  duration?: number;
13
13
  outputPath?: string;
@@ -20,8 +20,8 @@ export declare function getCssOutputFilenames(opts: {
20
20
  webpackConfig: WebpackConfig;
21
21
  useHash: boolean;
22
22
  }): {
23
- cssChunkFilename: string;
24
23
  cssFilename?: string | undefined;
24
+ cssChunkFilename: string;
25
25
  };
26
26
  export declare function getSSRCssSplitChunks(config: Record<string, any>): {
27
27
  splitChunks?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/bundler-utoopack",
3
- "version": "4.6.67",
3
+ "version": "4.6.68",
4
4
  "description": "@umijs/bundler-utoopack",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,11 +21,8 @@
21
21
  "resolve-url-loader": "5.0.0",
22
22
  "sass": "1.54.0",
23
23
  "sass-loader": "13.2.0",
24
- "@umijs/bundler-utils": "4.6.67",
25
- "@umijs/bundler-webpack": "4.6.67"
26
- },
27
- "devDependencies": {
28
- "father": "4.1.5"
24
+ "@umijs/bundler-utils": "4.6.68",
25
+ "@umijs/bundler-webpack": "4.6.68"
29
26
  },
30
27
  "publishConfig": {
31
28
  "access": "public"