Answers for "npm modules with laravel"

PHP
0

how to use node modules in laravel

mkdir my-app && cd my-app
npm init -y
npm install laravel-mix --save-dev
cp node_modules/laravel-mix/setup/webpack.mix.js ./
Posted by: Guest on March-20-2021
0

laravel use npm package

Run npm run watch , because keeps track of all changes in .js.

In app.js add

require('select2/dist/js/select2');
Posted by: Guest on December-30-2020

Browse Popular Code Answers by Language