@umijs/bundler-webpack 4.0.5 → 4.0.6

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.
@@ -9,15 +9,22 @@ async function addCopyPlugin(opts) {
9
9
  const copyPatterns = [
10
10
  (0, fs_1.existsSync)((0, path_1.join)(cwd, 'public')) && {
11
11
  from: (0, path_1.join)(cwd, 'public'),
12
+ // ref: https://github.com/webpack-contrib/copy-webpack-plugin#info
13
+ // Set minimized so terser will not do minimize
14
+ info: { minimized: true },
12
15
  },
13
16
  ...(userConfig.copy
14
17
  ? (_a = userConfig.copy) === null || _a === void 0 ? void 0 : _a.map((pattern) => {
15
18
  if (typeof pattern === 'string') {
16
- return (0, path_1.resolve)(cwd, pattern);
19
+ return {
20
+ from: (0, path_1.resolve)(cwd, pattern),
21
+ info: { minimized: true },
22
+ };
17
23
  }
18
24
  return {
19
25
  from: (0, path_1.resolve)(cwd, pattern.from),
20
26
  to: (0, path_1.resolve)(cwd, pattern.to),
27
+ info: { minimized: true },
21
28
  };
22
29
  })
23
30
  : []),
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import * as parcelCSS from '@parcel/css';
2
1
  import type webpack from '../compiled/webpack';
3
2
  import './requireHook';
4
3
  export type { RequestHandler } from '@umijs/bundler-utils/compiled/express';
@@ -7,5 +6,4 @@ export * from './build';
7
6
  export * from './config/config';
8
7
  export * from './dev';
9
8
  export * from './schema';
10
- export { parcelCSS };
11
9
  export { webpack };
package/dist/index.js CHANGED
@@ -10,25 +10,10 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
10
10
  if (k2 === undefined) k2 = k;
11
11
  o[k2] = m[k];
12
12
  }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
15
  };
28
16
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.parcelCSS = void 0;
30
- const parcelCSS = __importStar(require("@parcel/css"));
31
- exports.parcelCSS = parcelCSS;
32
17
  require("./requireHook");
33
18
  __exportStar(require("./build"), exports);
34
19
  __exportStar(require("./config/config"), exports);
@@ -0,0 +1,2 @@
1
+ import * as parcelCSS from '@parcel/css';
2
+ export { parcelCSS };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.parcelCSS = void 0;
27
+ const parcelCSS = __importStar(require("@parcel/css"));
28
+ exports.parcelCSS = parcelCSS;
@@ -188,7 +188,7 @@ async function createServer(opts) {
188
188
  const protocol = userConfig.https ? 'https:' : 'http:';
189
189
  const port = opts.port || 8000;
190
190
  server.listen(port, () => {
191
- const host = opts.host && opts.host !== '0.0.0.0' ? opts.host : '127.0.0.1';
191
+ const host = opts.host && opts.host !== '0.0.0.0' ? opts.host : 'localhost';
192
192
  utils_1.logger.ready(`App listening at ${utils_1.chalk.green(`${protocol}//${host}:${port}`)}`);
193
193
  });
194
194
  return server;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/bundler-webpack",
3
- "version": "4.0.5",
3
+ "version": "4.0.6",
4
4
  "description": "@umijs/bundler-webpack",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/bundler-webpack#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",
@@ -35,10 +35,10 @@
35
35
  "@svgr/plugin-jsx": "^6.2.1",
36
36
  "@svgr/plugin-svgo": "^6.2.0",
37
37
  "@types/hapi__joi": "17.1.8",
38
- "@umijs/babel-preset-umi": "4.0.5",
39
- "@umijs/bundler-utils": "4.0.5",
40
- "@umijs/mfsu": "4.0.5",
41
- "@umijs/utils": "4.0.5",
38
+ "@umijs/babel-preset-umi": "4.0.6",
39
+ "@umijs/bundler-utils": "4.0.6",
40
+ "@umijs/mfsu": "4.0.6",
41
+ "@umijs/utils": "4.0.6",
42
42
  "cors": "^2.8.5",
43
43
  "css-loader": "6.7.1",
44
44
  "es5-imcompatible-versions": "^0.1.73",