【发布时间】:2021-01-22 11:27:47
【问题描述】:
开发模式使用npm run dev,发布模式使用npm build
我怎么知道它当前是在开发模式下构建还是不在代码中,例如:
<script>
import {onMount} from 'svelte';
onMount(function(){
if(DEVMODE) { // --> what's the correct one?
console.log('this is x.svelte');
}
})
</script>
【问题讨论】: