Questions tagged [envify]
8 questions
5
votes
1 answer
What is the point of envifying client side libraries?
In an attempt to address the problem behind a warning coming from Redux I stumbled across the advice which explains that envifying is a necessary step when using React or Redux in order to produce a build that is optimized for production use.…

jpierson
- 16,435
- 14
- 105
- 149
1
vote
0 answers
trying to load vue-agile but ParseError
I'm building a website using vuejs and trying to load agile-vue to use globally in the vue app. So I added following code into main.js:
var VueAgile = require('vue-agile');
Vue.use(VueAgile);
Later on I use browserify with babelify and envify to…

Stijn Van der Linden
- 117
- 2
- 9
1
vote
2 answers
Conditional compile/require using browserify (dead code elimination)
I know you can't conditionally require a module with browserify because they're bundled at compile time, not run time. How about conditionally stripping modules?
Let's say I have an app that allows you to create image galleries. The galleries can…

Prinzhorn
- 22,120
- 7
- 61
- 65
1
vote
2 answers
variable config file based on environment - reactjs, webpack
I need bunch of global variables in my reactjs components(example: hostnames, token, api urls, etc) based on the environment. but I don't want to add it to the js individually. I would like to create project.config file to set up…

tv3free
- 173
- 1
- 19
1
vote
0 answers
Env for laravel/elixir with browserify
what is the solution for using environment variables in javascript projects with browserify?
In my current project I'm using laravel with elixir and browserify and I was trying to add envify but I don't know how to implement it into my elixir…

Jan
- 11
- 2
0
votes
1 answer
Envify not replacing my environment variables
I'm having trouble with the Browserify Envify module in a universal React app.
I have the following feature toggle file:
export const featureToggles = {
FEATURE_EXAMPLE: (process.env.FEATURE_EXAMPLE === 'true')
};
which in my Browserify output…

Per Enström
- 902
- 8
- 33
0
votes
1 answer
Browserify multiple transforms error
Trying to run multiple transforms with browserify.
I have the following files in a directory
dev.json
stage.json
prod.json
index.js
The json files are environment specific config files.
index.js :
var mode = process.env.APP_ENV;
module.exports =…

user843453
- 241
- 2
- 6
0
votes
2 answers
Envify CLI not removing process.env.NODE_ENV
I am trying to reduce the size of my React bundle.js.
I am attempting to use Envify with Browserify to replace process.env.NODE_ENV with the string "production", in order to use uglifyjs and remove all the extra development code.
Here is my…

Paul
- 83
- 1
- 7