hangry-river-horse icon indicating copy to clipboard operation
hangry-river-horse copied to clipboard

Use production version of Vue.js

Open randomPoison opened this issue 7 years ago • 0 comments

Currently, Vue warns us in the console that we're using the development version of Vue, and that we should use the production version when we deploy. Doing so mean using the minified Vue script, which would require changing the contents of the <script> element in our page depending on whether we're running in development or deployment.

Fortunately, Rocket has support for templating, which we can leverage to change which script we load based on which environment the server is running in. You can see the definitions for which environments we have in Rocket.toml. In staging and production we'll want to use the production version of Vue, but in the development environment (the default when running locally) we'll want to keep the dev version.

randomPoison avatar Jul 23 '17 06:07 randomPoison