Ошибка, когда я изменяю свой базовый href в Angular 2+ MIME ERROR - PullRequest
0 голосов
/ 05 сентября 2018

Мне нужна помощь. В настоящее время мое угловое приложение 2+ будет успешно работать, когда я его сервер и подключусь к localhost: 4200 Однако, когда я пытаюсь изменить base href на base href = "/ shift-report /", чтобы оно загружалось как localhost: 4200 / shift-report / не запускается и я получаю странные ошибки ниже. Не уверен, что мне не хватает, спасибо за любую помощь

++++++ ОШИБКА ++++++

Refused to execute script from 'http://localhost:4200/shift- 
report/inline.bundle.js' because its MIME type ('text/html') is not 
executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:4200/shift- 
report/polyfills.bundle.js' because its MIME type ('text/html') is not 
executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:4200/shift- 
report/styles.bundle.js' because its MIME type ('text/html') is not 
executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:4200/shift- 
report/scripts.bundle.js' because its MIME type ('text/html') is not 
executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:4200/shift- 
report/vendor.bundle.js' because its MIME type ('text/html') is not 
executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:4200/shift- 
report/main.bundle.js' because its MIME type ('text/html') is not 
executable, and strict MIME type checking is enabled.

++++ index.html ++++++

<!doctype html>
<html lang="en">
<head>
 <meta charset="utf-8">
  <title>Shift Report</title>
   <base href="/shift-report/">

   <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>
  </body>
  </html>
...