Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gdonega/7a529482d5c8b9a7f802660652f6970a to your computer and use it in GitHub Desktop.
Save gdonega/7a529482d5c8b9a7f802660652f6970a to your computer and use it in GitHub Desktop.
Arrumando "./src/index.ejs" para a nova versão do Electron
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>meu-projeto-electron-vue</title>
<% if (htmlWebpackPlugin.options.nodeModules) { %>
<!-- Add `node_modules/` to global paths so `require` works properly in development -->
<script>
require('module').globalPaths.push('<%= htmlWebpackPlugin.options.nodeModules.replace(/\\/g, '\\\\') %>')
</script>
<% } %>
</head>
<body>
<div id="app"></div>
<!-- Set `__static` path to static files in production -->
<% if (!htmlWebpackPlugin.options.isBrowser && !htmlWebpackPlugin.options.isDevelopment) { %>
<script>
window.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
</script>
<% } %>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment