在Laravel 5.4中,引入了Mix来编译assets资源 和维护assets资源 管道.Mix默认将您的公共目录命名为public
.在很多情况下,包括我的,我的公共目录被称为其他东西.就我而言,是public_html
.
如何更改assets资源 编译到的公共目录?
I have tried changing the paths within 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 compiles to:
- public
|- _html
|-- assets
|--- css
|--- js
|- fonts
在Laravel 5.3和Elixir中,这很简单:
elixir.config.publicPath = 'public_html/assets';
I have checked Mix's config file, but can't see anything obvious here.
Please note: this is Laravel Mix, the npm package, so it's nothing to do with amends in the index.php
file.