using an evn variable no longer works on assets compilation, on older version of mix 0.11.4 it was working correctly.
mix.sass('resources/' + process.env.MIX_MM_FRAMEWORK + '/xxx.scss', 'public/assets/vendor/style.css')
.version()
duplicate of #1143
@ctf0 BTW it looks like all you need to do is use the dotenv package yourself (already installed by Mix). For example, here's how i'm using it to define the Browsersync proxy URL for a WordPress theme:
let mix = require('laravel-mix');
require('dotenv').config();
let proxy_url = process.env.BROWSERSYNC_PROXY_URL || 'local.wordpress.dev';
// .. your mix configuration here...
.browserSync({
proxy: proxy_url,
});
@dabernathy89 focken AWESOME, many thanx.
hello there, can anyone tell me how to access the api key from .env file in a vue.js component in laravel mix, please see here: https://stackoverflow.com/questions/52353266/how-to-access-vue-js-api-key-in-laravel-application/52353392?noredirect=1#comment91651775_52353392 thanks
I could i never realize that just using process.env.APP_URL works! I'm using laravel-mix v4, no need to require dotenv
Most helpful comment
@ctf0 BTW it looks like all you need to do is use the
dotenvpackage yourself (already installed by Mix). For example, here's how i'm using it to define the Browsersync proxy URL for a WordPress theme: