Question 1:

Console run command: webpack –mode=development error: cannot load the file webpack.ps1 because scripts are not allowed to run on this system

Solutions:

At the console — Terminal:

  1. Execute the commandget-ExecutionPolicy

    According toRestricted
  2. performset-ExecutionPolicy RemoteSignedAn error
  3. performStart-Process powershell -Verb runAsTo open the powershell

In powershell:

  1. performset-ExecutionPolicy RemoteSigned
  2. Choose as promptedY

After completion in the console — Terminal:

Run the get-ExecutionPolicy again and show the RemoteSigned

Question 2:

Run webpack –mode=development or check the version number webpack-v to always display webpack-CLI installation, after installation again or remind installation

Solutions:

If webpack-cli is not installed globally, run NPM install –save-dev webpack-cli -g

After installation, execute webpack –mode=development again and create DIST successfully