I am making a blogging application with Laravel 8 and Bootstrap 5. I use a form placed within a Bootstrap modal to add a post. In addition, I include a single JavaScript file in the project.
<script src="{{ asset('js/app.js') }}"></script>
In resources/js, I have an app.js and a bootstrap.js file. In app.js, I require bootstrap.js with
require('./bootstrap')
From webpack.mix.js I compile all that into the single JavaScript file public\js\app.js:
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
.sourceMaps();
I want to add popper.js to the project, like this:
require('./popper');
require('./bootstrap');
But, for this purpose, I need the popper.js in resources/js along with the other two files. So, I did npm i @popperjs/core and npm run dev. But it does not compile, and I don't get popper.js in the above-metioned js directory. So, how can I fix this issue?