From 10d650d74dea9f5ee496c7022e992785308d109f Mon Sep 17 00:00:00 2001 From: Stefan Grund Date: Tue, 9 Jan 2018 14:09:36 +0100 Subject: [PATCH] Update deployment.md with Grunt example --- src/v2/guide/deployment.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/v2/guide/deployment.md b/src/v2/guide/deployment.md index 054b03344f..c8f4274305 100644 --- a/src/v2/guide/deployment.md +++ b/src/v2/guide/deployment.md @@ -61,6 +61,29 @@ module.exports = { ) .bundle() ``` + +- Or, using [envify](https://github.com/hughsk/envify) with Grunt and [grunt-browserify](https://github.com/jmreidy/grunt-browserify): + + ``` js + // Use the envify custom module to specify environment variables + var envify = require('envify/custom') + + browserify: { + dist: { + options: { + // Function to deviate from grunt-browserify's default order + configure: b => b + .transform('vueify') + .transform( + // Required in order to process node_modules files + { global: true }, + envify({ NODE_ENV: 'production' }) + ) + .bundle() + } + } + } + ``` #### Rollup