如何从我的视图文件中的node_modules /文件夹导入文件?

I'm trying to learn some new technologies so I decided to give npm a try, so I download theses packages(jquery and jquery-validation) using npm and now I'm trying to link theses packages to my view file but I can`t access any outside the public folder.

Should I being using some other component that I'm not aware of or there's some way to make my packages in node_modules/ accessible?

I've tried to connect the usual away but is not happening

Heres my structure folder and a few important files:

  • myproject
    • App
      • Controllers
      • Models
      • Views
        • Signup
          • new.html
        • base.html
    • Core
    • node_modules
      • jquery
      • jquery-validation
    • public
      • index.php(Front Controller)
    • etc...

Base.html (I'm using twig as a template engine)

<nav>
    <a href="/">Home</a>
</nav>

{% block body %} 
{% endblock %}

<script src="node_modules/jquery/dist/jquery.min.js"></script>

index.php

/**
 * Front Controller
 */

 /**
  * Composer
  */
require '../vendor/autoload.php';

/**
 * Error and Exception handling
 */
error_reporting(E_ALL);
set_error_handler('Core\Error::errorHandler');
set_exception_handler('Core\Error::exceptionHandler');

 /**
  * Routing
  */
$router = new Core\Router();

// Add the routes
$router->add('', ['controller' => 'Home', 'action' => 'index']);
$router->add('{controller}/{action}');
//$router->add('{controller}/{id:\d+}/{action}');
//$router->add('admin/{controller}/{action}', ['namespace' => 'Admin']);

$router->dispatch($_SERVER['QUERY_STRING']);