aerlaut's avatar

Laravel Mix working with local library

I'd like to use some local library in Mix. I can already require them like so :

require('./libs/my-lib.js')`

I'd like to extract it. How can I do that?

A way to extract packages downloaded from NPM is

mix.js(...).extract(['jquery'])`

How can I extract my local lib? I've already tried

mix.js(...).extract(['jquery', './libs/my-lib.js'])`

but it doesn't work (can't resolve ./libs/my-lib.js)

0 likes
2 replies
aerlaut's avatar

not yet... I'll try it with modules

Please or to participate in this conversation.