@umijs/bundler-webpack 4.0.0-rc.21 → 4.0.0-rc.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/build.js CHANGED
@@ -32,7 +32,9 @@ async function build(opts) {
32
32
  });
33
33
  let isFirstCompile = true;
34
34
  return new Promise((resolve, reject) => {
35
- utils_1.rimraf.sync(webpackConfig.output.path);
35
+ if (opts.clean) {
36
+ utils_1.rimraf.sync(webpackConfig.output.path);
37
+ }
36
38
  const compiler = (0, webpack_1.default)(webpackConfig);
37
39
  compiler.run((err, stats) => {
38
40
  var _a;
@@ -75,7 +75,7 @@ async function getConfig(opts) {
75
75
  config.output
76
76
  .path(absOutputPath)
77
77
  .filename(useHash ? `[name].[contenthash:8].js` : `[name].js`)
78
- .chunkFilename(useHash ? `[name].[contenthash:8].async.js` : `[name].js`)
78
+ .chunkFilename(useHash ? `[name].[contenthash:8].async.js` : `[name].async.js`)
79
79
  .publicPath(userConfig.publicPath || 'auto')
80
80
  .pathinfo(isDev || disableCompress);
81
81
  // resolve
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type webpack from '../compiled/webpack';
2
+ import './requireHook';
2
3
  export type { RequestHandler } from '@umijs/bundler-utils/compiled/express';
3
4
  export type { Compiler, Stats } from '../compiled/webpack';
4
5
  export * from './build';
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ require("./requireHook");
17
18
  __exportStar(require("./build"), exports);
18
19
  __exportStar(require("./config/config"), exports);
19
20
  __exportStar(require("./dev"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/bundler-webpack",
3
- "version": "4.0.0-rc.21",
3
+ "version": "4.0.0-rc.24",
4
4
  "description": "@umijs/bundler-webpack",
5
5
  "homepage": "https://github.com/umijs/umi-next/tree/master/packages/bundler-webpack#readme",
6
6
  "bugs": "https://github.com/umijs/umi-next/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.0-rc.21",
39
- "@umijs/bundler-utils": "4.0.0-rc.21",
40
- "@umijs/mfsu": "4.0.0-rc.21",
41
- "@umijs/utils": "4.0.0-rc.21",
38
+ "@umijs/babel-preset-umi": "4.0.0-rc.24",
39
+ "@umijs/bundler-utils": "4.0.0-rc.24",
40
+ "@umijs/mfsu": "4.0.0-rc.24",
41
+ "@umijs/utils": "4.0.0-rc.24",
42
42
  "cors": "^2.8.5",
43
43
  "css-loader": "6.7.1",
44
44
  "es5-imcompatible-versions": "^0.1.73",