Skip to content

Instantly share code, notes, and snippets.

@sslotsky
Created May 22, 2018 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sslotsky/d85c49f00b6f72b7299176111ed9e191 to your computer and use it in GitHub Desktop.
Save sslotsky/d85c49f00b6f72b7299176111ed9e191 to your computer and use it in GitHub Desktop.
const browserify = require("@cypress/browserify-preprocessor");
module.exports = on => {
const options = browserify.defaultOptions;
options.browserifyOptions.transform[1][1].plugins.push([
"transform-define",
{
"process.env.API_URL": process.env.API_URL
}
]);
on("file:preprocessor", browserify(options));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment