# Uibuilder how to switch between production and development mode in vueJS

**URL:** https://discourse.nodered.org/t/uibuilder-how-to-switch-between-production-and-development-mode-in-vuejs/45792
**Category:** Dashboard
**Created:** [17 May 2021 15:32 UTC](https://discourse.nodered.org/t/uibuilder-how-to-switch-between-production-and-development-mode-in-vuejs/45792 "2021-05-17T15:32:57Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![maxkremmel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maxkremmel/32/40906_2.png) [@maxkremmel](https://discourse.nodered.org/u/maxkremmel)
#### Post date: [17 May 2021 15:32 UTC](https://discourse.nodered.org/t/uibuilder-how-to-switch-between-production-and-development-mode-in-vuejs/45792/1 "2021-05-17T15:32:57Z")

</div>

The title basically describes my problem. I don't know how to switch between production and development environment.

Thx for your help  
Max

---

<div class="post-metadata">

### Author: ![tve](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tve/32/59475_2.png) [@tve](https://discourse.nodered.org/u/tve)
#### Post date: [17 May 2021 16:33 UTC](https://discourse.nodered.org/t/uibuilder-how-to-switch-between-production-and-development-mode-in-vuejs/45792/2 "2021-05-17T16:33:45Z")

</div>

If you're using Vue I would very highly recommend setting up a conventional vue development environment with vue-cli and using that to serve-up your UI. You get hot-reload and good integration with the vue devtools browser plugin. Then you can run build to produce a production build and place that into the node-red static file area or in the uibuilder directory.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [17 May 2021 19:38 UTC](https://discourse.nodered.org/t/uibuilder-how-to-switch-between-production-and-development-mode-in-vuejs/45792/3 "2021-05-17T19:38:52Z")

</div>

Hi Max, this is a Node.js standard convention, you simply set an appropriate environment variable before starting Node-RED.

[Node.js, the difference between development and production (nodejs.dev)](https://nodejs.dev/learn/nodejs-the-difference-between-development-and-production)

> [@tve](#):
>
> very highly recommend setting up a conventional vue development environment with vue-cli and using that to serve-up your UI.

Sorry, I have to somewhat disagree here. This is only worth-while for complex apps. For anything simple you are much better off without all of that. Especially now that uibuilder has some hot-reload built in.

Even for complex apps I personally wouldn't use vue-cli but would create a proper build workflow using whatever build tool you are familiar with (e.g. Webpack, Snowpack, Parcel, etc).

---

<div class="post-metadata">

### Author: ![tve](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tve/32/59475_2.png) [@tve](https://discourse.nodered.org/u/tve)
#### Post date: [17 May 2021 20:20 UTC](https://discourse.nodered.org/t/uibuilder-how-to-switch-between-production-and-development-mode-in-vuejs/45792/4 "2021-05-17T20:20:07Z")

</div>

to each their own...

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [16 June 2021 20:20 UTC](https://discourse.nodered.org/t/uibuilder-how-to-switch-between-production-and-development-mode-in-vuejs/45792/5 "2021-06-16T20:20:23Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
