Angular - I can’t make build generated files (npm) work on the localhost

Asked

Viewed 33 times

0

I ran the build command (dev option) and copied the dist folder inside the XAMPP htdocs folder. When calling the project in the browser, the app-root is not recognized and shows nothing on the index page.

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Forms</title>
  <!--
  <base href="/">
  -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
  <app-root></app-root>
<script type="text/javascript" src="inline.bundle.js"></script><script type="text/javascript" src="polyfills.bundle.js"></script><script type="text/javascript" src="styles.bundle.js"></script><script type="text/javascript" src="vendor.bundle.js"></script><script type="text/javascript" src="main.bundle.js"></script></body>
</html>
  • 1

    https://stackoverflow.com/a/51636683/9555410

  • Running the build this way worked correctly. Thank you very much jraspante.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.