简体   繁体   中英

Laravel 5 elixir config cssoutput not working

I am using elixir for some sass compiling, but the 'public' folder is renamed to 'public_html' in this project (convention of our webserver)..

Is it possible to set this public directory globally in my elixir config so I don't have to specifiy it on every elixir function?

elixir.config.publicDir = 'public_html';
elixir.config.cssOutput = 'public_html/css';
elixir.config.jsOutput = 'public_html/js';

This should work but it does not!

Any ideas why?

Ok so I found a solution, there is a config.js file in de exlixir folder of the node-modules, there you can specify the publicPath directory.

I would love to see other ways to do this though, so any other solutions are welcome!

EDIT: so I was confusing things. I don't need 'cssOutput' but 'publicPath'. If you like to change the default public path you can set the publicPath option using

var elixir = require('laravel-elixir');
elixir.config.publicPath = 'public_html';

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM