Laravel mix.js() using absolute path after publicPath is set

Viewed 1288

My Folder hierarchy from document root is -

/
|- private/
|- private/webpack.mix.js
|- public/
|- public/assets/*

I've set my public path to -

mix.setPublicPath('../public/assets/');

And I'm then compiling and extracting the default laravel scripts -

mix.js('resources/assets/js/app.js', '/js/app.js')
.extract([
    'vue',
    'jquery',
    'bootstrap',
]);

My Absolute path to the public directory is - /Library/Server/Web/Data/Sites/myweb.xyz/public And vendor.js, manifest.js and app.js are being in the public path but as such - /public/assets/Library/Server/Web/Data/Sites/myweb.xyz/public

Is this an issue with mix or am I doing something wrong? I only have a problem with mix.js(), everything else works as expected.

0 Answers
Related