microsoft / TypeScript-Vue-Starter

A starter template for TypeScript and Vue with a detailed README describing how to use the two together.
MIT License
4.45k stars 592 forks source link

Note regarding NODE_ENV=development vs NODE_ENV=production #4

Open diverted247 opened 7 years ago

diverted247 commented 7 years ago

Vue Template compiler emits different content depending on this setting. It would be advised to include it in the scripts so devs can switch output easily from development to production...

"scripts": { "build": "NODE_ENV=development webpack", "test": "echo \"Error: no test specified\" && exit 1" },

--> Output: build.js ---> 877 kB

vs

"scripts": { "build": "NODE_ENV=production webpack", "test": "echo \"Error: no test specified\" && exit 1" },

--> Output: build.js ---> 104 kB (35kB gzip)

Great work on this. The workflow and example are very well done.

fraindz commented 6 years ago

@DanielRosenwasser can you please review and merge?