Skip to content

Commit

Permalink
Fix process is undefined error
Browse files Browse the repository at this point in the history
  • Loading branch information
timchanpon committed Mar 27, 2021
1 parent 3a14544 commit eb6d018
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<body>
<div id="app"></div>
<!-- Set `__static` path to static files in production -->
<% if (!process.browser) { %>
<% if (!require('process').browser) { %>
<script>
if (process.env.NODE_ENV !== 'development') window.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
if (require('process').env.NODE_ENV !== 'development') window.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
</script>
<% } %>

Expand Down

0 comments on commit eb6d018

Please sign in to comment.