my javascript file does not run

Hello I have a problem all my files js executes perfectly because it is by a link but that I have a file js locally it does not load (rwd-table.js).

<DOCTYPE html>
  <html lang="fr">
      <meta charset="utf-8"/>
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <link rel="stylesheet" href="" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
      <link rel="stylesheet" href="{{ base_url() }}/css/app.css">
      <link rel="stylesheet" href="{{ base_url() }}/css/rwd-table.min.css">
      {% include 'templates/partials/navigation.twig' %}
      <div class="container">
        {% include 'templates/partials/flash.twig' %}
        {% block content %}{% endblock %}
      <script src=""></script>
      <script src="" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
      <script type="text/javascript" src=""></script>
      <script src="{{ base_url() }}/js/rwd-table.js"></script>

What URL shows up in the response for rwd-table.js and what URL were you expecting?

The <base href=""> HTML tag/attribute specifies the base URL which will be used for all relative links in the current document (images, js, css etc…)

You only need to set the base URL in the HTML header once.


        <base href="{{ base_url() }}/">

Note: The base URL can be relative and must contain a trailing slash (/).

With the correct base url you can link to the assets without the extra function call.

<script src="js/rwd-table.js"></script>

Ok thank for your help