mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-19 13:05:18 +00:00
_error.html renders error.stack when process.env.NODE_ENV === 'development'
https://github.com/sveltejs/sapper-template/issues/73
This commit is contained in:
@@ -6,6 +6,12 @@
|
|||||||
|
|
||||||
<p>{error.message}</p>
|
<p>{error.message}</p>
|
||||||
|
|
||||||
|
{#if NODE_ENV === 'development'}
|
||||||
|
<pre>
|
||||||
|
{error.stack}
|
||||||
|
</pre>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
h1, p {
|
h1, p {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
@@ -26,4 +32,14 @@
|
|||||||
font-size: 4em;
|
font-size: 4em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
NODE_ENV: process.env.NODE_ENV
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user