Laravel 5.4 introduced a mixture to compile assets and maintain an asset pipeline. Mix the defaults with the public directory. In many cases, including mine, my shared directory is called something else. In my case, this is public_html .
How to change the shared directory in which assets are compiled?
I tried changing the paths in webpack.min.js to:
mix.js('resources/assets/js/app.js', 'public_html/assets/js') .sass('resources/assets/sass/app.scss', 'public_html/assets/css');
Unfortunately, this compiled:
- public |- _html |-- assets |--- css |--- js |- fonts
In Laravel 5.3 and Elixir, it was as simple as:
elixir.config.publicPath = 'public_html/assets';
I checked the Mix configuration file, but don't see anything obvious here.
Please note: this is Laravel Mix, the npm package, so it has nothing to do with changes to the index.php file.
Mike
source share