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:
- Execute the command
get-ExecutionPolicy
According toRestricted
- perform
set-ExecutionPolicy RemoteSigned
An error - perform
Start-Process powershell -Verb runAs
To open the powershell
In powershell:
- perform
set-ExecutionPolicy RemoteSigned
- Choose as prompted
Y
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