I'm trying to deploy my first angular app but during the execution of deploy, in the middle of the command:
node node_modules/webpack/bin/webpack.js --mode=production --env.prod
(A.K.A. webpack --mode=production --config webpack.config.js --env.prod
)
I get a generic error which does not provide me more informations than the following:
Hash: 7b126cdcbdda85d6b0f304152e501136ec85ed58 Version: webpack 4.6.0 Child Hash: 7b126cdcbdda85d6b0f3 Time: 13298ms Built at: 2018-04-23 12:27:51 1 asset Entrypoint main-client = main-client.js ERROR in window is not defined Child Hash: 04152e501136ec85ed58 Time: 13281ms Built at: 2018-04-23 12:27:51 1 asset Entrypoint main-server = main-server.js ERROR in window is not defined
Main-server and Main-client are both webpack-generated files and the only usage of "window" in my code is to execute the window.history.back()
command but even commenting it, the error still comes up.
Does anyone knows how to solve it?
My webpack version is 4.6.0 and my webpack.config.js content is the following:
||
===> UPDATE - unnecessary webpack.config.js content as not related to the issue itself