Skip to content
This repository was archived by the owner on Dec 26, 2018. It is now read-only.

Commit 68694e9

Browse files
committed
add a note about building for production
1 parent 8c5e9ed commit 68694e9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,14 @@ browserify('./main.js')
294294

295295
This only works for vueify 9+. For Vue 1.x / vueify 8.x you can use [vueify-extract-css](https://github.com/rawcreative/vueify-extract-css).
296296

297+
## Building for Production
298+
299+
When building for production, follow these steps to ensure smaller bundle size:
300+
301+
1. Make sure `process.env.NODE_ENV === "production"`. This tells `vueify` to avoid including hot-reload related code.
302+
303+
2. Apply a global [envify](https://github.com/hughsk/envify) transform to your bundle. This allows the minifier to strip out all the warnings in Vue's source code wrapped in env variable conditional blocks.
304+
297305
## Compiler API
298306

299307
The compiler API (originally `vue-component-compiler`) is also exposed:

0 commit comments

Comments
 (0)