Skip to content

Commit ef9c590

Browse files
stefangrundchrisvfritz
authored andcommitted
Update deployment.md with Grunt example (#1375)
1 parent 0169caa commit ef9c590

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Diff for: src/v2/guide/deployment.md

+23
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,29 @@ module.exports = {
6161
)
6262
.bundle()
6363
```
64+
65+
- Or, using [envify](https://github.com/hughsk/envify) with Grunt and [grunt-browserify](https://github.com/jmreidy/grunt-browserify):
66+
67+
``` js
68+
// Use the envify custom module to specify environment variables
69+
var envify = require('envify/custom')
70+
71+
browserify: {
72+
dist: {
73+
options: {
74+
// Function to deviate from grunt-browserify's default order
75+
configure: b => b
76+
.transform('vueify')
77+
.transform(
78+
// Required in order to process node_modules files
79+
{ global: true },
80+
envify({ NODE_ENV: 'production' })
81+
)
82+
.bundle()
83+
}
84+
}
85+
}
86+
```
6487

6588
#### Rollup
6689

0 commit comments

Comments
 (0)