I'm trying to export the project to production, but it only works when I put it in the root of the server.
If, for example, I put it in localhost/dist
it does not work anymore.
I have tried to modify the route with the command ng build --base-href=/dist --prod
, but, although the modifier still does not work, therefore, I understand that something I am doing wrong.
The idea is to be able to export the project to be able to use it in a route that is not the base of the server, since I need to put it in several different folders, one per client.
I've managed to make it look like <base href="http://localhost/Proyecto/dist/">
But I do not link the images well, I understand that it is because the code is bad in code, but if I run the webpack live server it looks good (npm start)
<!doctype html>
<html lang="es">
<head>
<meta charset="utf-8">
<title>Proyecto</title>
<base href="http://localhost/Proyecto/dist/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
<link rel="stylesheet" href="styles.734eae50a5c982a6cd75.css">
</head>
<body>
<app-root></app-root>
<script type="text/javascript" src="runtime.a66f828dca56eeb90e02.js"></script>
<script type="text/javascript" src="polyfills.7a0e6866a34e280f48e7.js"></script>
<script type="text/javascript" src="scripts.95f63946aa03ea45d109.js"></script>
<script type="text/javascript" src="main.c686d7d3bc65f8946dda.js"></script>
</body>
</html>