compiling single js files into the vendor.js file

iateadonut posted 1 year ago

In Laravel 5.4, in webpack.mix.js, I have this:

mix.js( ['resources/assets/js/app.js', 'resources/assets/js/test.js'], 'public/js/app.js') .extract(["axios", "bootstrap-sass", "jquery", "laravel-mix", "lodash", "vue"])

which compiles app.js and test.js into public/js/app.js

and takes the vendor files from node_modules and compiles them into vendor.js (.extract).

I want to get a file from here: and insert it into the vendor.js file. It installs easily by npm but there is no index.js file included in that package, so it is not compiling into app.js or vendor.js. So I need to grab a single file just for vendor.js.

I'm wondering how I can add a single file to the vendor.js file?

Sign in to participate in this thread!

We'd like to thank these amazing companies for supporting us