Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

How to differentiate between Svelte dev mode and build mode?

$
0
0

The dev mode using npm run dev, the release mode using npm build

How could i know that it's currently built on dev mode or not in the code, for example:

<script>    import {onMount} from 'svelte';    onMount(function(){        if(DEVMODE) { // --> what's the correct one?            console.log('this is x.svelte');        }    })</script>

Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>