Skip to content

Commit

Permalink
refactor: code
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Jan 29, 2021
1 parent 28d40d8 commit d103904
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/webpack-cli/lib/utils/index.js
Expand Up @@ -19,6 +19,10 @@ module.exports = {
return require('./capitalize-first-letter');
},

get dynamicImportLoader() {
return require('./dynamic-import-loader');
},

get getPackageManager() {
return require('./get-package-manager');
},
Expand Down
2 changes: 1 addition & 1 deletion packages/webpack-cli/lib/webpack-cli.js
Expand Up @@ -1164,7 +1164,7 @@ class WebpackCLI {
Module.prototype._compile = this._originalModuleCompile;
}

const dynamicImportLoader = require('./utils/dynamic-import-loader')();
const dynamicImportLoader = this.utils.dynamicImportLoader();

if (this._originalModuleCompile) {
Module.prototype._compile = previousModuleCompile;
Expand Down

0 comments on commit d103904

Please sign in to comment.