This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm audit --fix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
let mainWindow | |
const winURL = process.env.NODE_ENV === 'development' | |
? `http://localhost:9080` | |
: `file://${__dirname}/index.html` | |
function createWindow () { | |
/** | |
* Initial window options | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This file is used specifically and only for development. It installs | |
* `electron-debug` & `vue-devtools`. There shouldn't be any need to | |
* modify this file, but it can be used to extend your development | |
* environment. | |
*/ | |
/* eslint-disable */ | |
// Install `electron-debug` with `devtron` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
function createWindow () { | |
/** | |
* Initial window options | |
*/ | |
mainWindow = new BrowserWindow({ | |
height: 563, | |
useContentSize: true, | |
width: 1000, | |
webPreferences: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
let mainConfig = { | |
entry: { | |
main: path.join(__dirname, '../src/main/index.js') | |
}, | |
externals: [ | |
...Object.keys(dependencies || {}), | |
{'electron-debug': 'electron-debug'} | |
], | |
module: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm audit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
import { app, BrowserWindow } from 'electron' | |
/** | |
* Set `__static` path to static files in production | |
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html | |
*/ | |
if (process.env.NODE_ENV !== 'development') { | |
global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
process.env.BABEL_ENV = 'renderer' | |
const path = require('path') | |
const { dependencies } = require('../package.json') | |
const webpack = require('webpack') | |
const MinifyPlugin = require("babel-minify-webpack-plugin") | |
const CopyWebpackPlugin = require('copy-webpack-plugin') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm run dev |