'I reference my CSS page to my HTML and it simply won't have any effect

I am currently working on a java project and have made an html page with a design (css) page to accompany it. I have referenced it but it still won't have any effect. I hard reloaded the page still no changes. Don't really understand why this is happening. I keep getting "net::ERR_ABORTED 404" on localhost. The stylesheet file name is indeed correct (being loginStyle.css). They are also both located in the same folder. Would appreciate any help. Thanks!

.btn-color {
  background-color: #0e1c36;
  color: #fff;
}

.profile-image-pic {
  height: 200px;
  width: 200px;
  object-fit: cover;
}

.cardbody-color {
  background-color: #ebf2fa;
}
<!DOCTYPE html>
<html lang="en" xmlns:thymeleaf.org>

<head>
  <link rel="stylesheet" type="text/css" href="loginStyle.css" />
</head>

<div class="container">
  <div class="row">
    <div class="col-md-6 offset-md-3">
      <h2 class="text-center text-dark mt-5">Welcome</h2>
      <div class="card my-5">

        <form class="card-body cardbody-color p-lg-5" th:action="@{/userLogin}" th:object="${user}" method="post">

          <div class="text-center">
            <img src="https://cdn.pixabay.com/photo/2016/03/31/19/56/avatar-1295397__340.png" class="img-fluid profile-image-pic img-thumbnail rounded-circle my-3" width="200px" alt="profile">
          </div>

          <div class="mb-3">
            <input type="text" class="form-control" id="Username" aria-describedby="emailHelp" placeholder="User Name" th:field="*{Id}">
          </div>
          <div class="mb-3">
            <input type="password" class="form-control" id="password" placeholder="password" th:field="*{password}">
          </div>
          <div class="text-center"><button type="submit" class="btn btn-color px-5 mb-5 w-100">Login</button></div>
          <div id="emailHelp" class="form-text text-center mb-5 text-dark">Not Registered?
            <a href="#" class="text-dark fw-bold"> Create an Account
                    </a>
          </div>
        </form>
      </div>

    </div>
  </div>
</div>

</html>


Solution 1:[1]

Figured out the issue.

The TypeScript SDK used by Yarn uses tsconfig.json to figure out to which files it should be applied. If you use the include or exclude options in your tsconfig.json, the SDK used by Yarn will also apply those options. Thus, you need to have those options commented out within your base tsconfig.json.

The solution to have TypeScript include/exclude files as necessary is to have a specific configuration file you use for the build step.

Thus, you would have a tsconfig.json as follows:

{
  "compilerOptions": {
    "target": "es2016",
    "module": "es6",
    "moduleResolution": "node",
    "declaration": true,
    "declarationMap": true,
    "outDir": "dist",
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "skipLibCheck": true
  }
}

And you would have another file not named tsconfig.json, which contains the following:

{
  "extends": "tsconfig.json",
  "exclude": ["./tests/**/*"]
}

That file can be named essentially whatever you would like; I chose tsconfig.build.json to be explicit about the fact that it is used only for the build step.

Then, in your package scripts, you need to call tsc with the -p flag, to which you provide the path to your tsconfig.build.json e.g. tsc -p tsconfig.build.json.

With this structure, you can have the best of both worlds; working IntelliSense and a clean dist folder.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Catradora