Using envify in laravel/elixir project
Opened this issue · 1 comments
Deleted user commented
I have this in my gulpfile.js
elixir(function(mix) {
mix.browserify(['app.jsx'], 'public/js/app.js');
});
How can I add envify so I could use env variables in my app.jsx ?
Thanks
yoshuawuyts commented
From the docs using transforms can be done by adding a transform field:
var elixir = require('laravel-elixir');
var browserify = require('laravel-elixir-browserify');
elixir(function(mix) {
browserify.init();
mix.browserify("bootstrap.js", {
transform: ["envify/custom"],
});
});
Cheers!