npm list --depth=0)node -v): 8.2.1npm -v): 5.3.0Variable prefixed with MIX_ in .env file is not available for use.
Set up project and define host using WAMP. Define MIX_SENTRY_DSN_PUBLIC in .env.
When using mix.browserSync(process.env.MIX_SENTRY_DSN_PUBLIC) it will not work.
When I use console.log(process.env.MIX_SENTRY_DSN_PUBLIC) it shows undefined in console.
If I use mix.browserSync('http://example.com') then it works.
Note: I'm opening this again, since this behavior is NOT as expected. Laravel documentation clearly states that this should be working: https://laravel.com/docs/5.4/mix#environment-variables
I must repeat, this was working in earlier version. And how should different developers work in same project when everyone uses different url for browserSync?
We have to compile your code down to parse your .env variables. So they aren't accessible from your webpack.mix.js file. Only your core JS bundle.
Hey Jeffrey - is there any alternative way to allow multiple URLs for browserSync? We've got multiple devs using different local development URLs.