Level 102
What if you use 0 and 1? They are still boolean flags
Hey everyone. Is there a way to use boolean environment variables with Laravel Mix? For example, I'm trying to set up Echo so that we can configure the security related flags based on the environments.
window.Echo = new Echo({
encrypted: process.env.MIX_ECHO_ENCRYPTED,
forceTLS: process.env.MIX_ECHO_FORCE_TLS,
disableStats: true,
});
I've shortened the example for brevity. But once compiled, it ends up looking like:
window.Echo = new Echo({
encrypted: "true",
forceTLS: "false",
disableStats: true,
});
Any input would be appreciated. Thanks in advance!
Please or to participate in this conversation.