Skip to content

Commit

Permalink
[renderer] disable nodeIntegration and use preload
Browse files Browse the repository at this point in the history
  • Loading branch information
toyobayashi committed Jul 9, 2019
1 parent 450023a commit fdd1e7d
Show file tree
Hide file tree
Showing 48 changed files with 606 additions and 535 deletions.
83 changes: 38 additions & 45 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"vue-loader": "^15.7.0",
"vue-property-decorator": "^8.2.1",
"vue-template-compiler": "^2.6.10",
"webpack": "^4.35.2",
"webpack": "^4.35.3",
"webpack-dev-server": "^3.7.2",
"webpack-node-externals": "^1.7.2"
},
Expand Down
4 changes: 2 additions & 2 deletions app/script/build.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { mainConfig, rendererConfig/* , preloadConfig */ } from './webpack.config'
import { mainConfig, rendererConfig, preloadConfig } from './webpack.config'
import { compile } from './util'
import config from './config'

export default function build () {
return Promise.all([
compile(mainConfig, config.statsOptions),
// compile(preloadConfig, config.statsOptions),
compile(preloadConfig, config.statsOptions),
compile(rendererConfig, config.statsOptions)
])
}
Expand Down
10 changes: 5 additions & 5 deletions app/script/dev.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mainConfig, rendererConfig/* , preloadConfig */ } from './webpack.config'
import { mainConfig, rendererConfig, preloadConfig } from './webpack.config'
import { watch, startDevServer } from './util'
import config from './config'
import start from './start'
Expand All @@ -17,11 +17,11 @@ export default function dev () {

const firstLaunch = {
main: false,
// preload: false,
preload: false,
renderer: false
}

const isReady = () => firstLaunch.main /* && firstLaunch.preload */ && firstLaunch.renderer
const isReady = () => firstLaunch.main && firstLaunch.preload && firstLaunch.renderer

const relaunch = function relaunch () {
if (appProcess) {
Expand All @@ -47,7 +47,7 @@ export default function dev () {
console.log(stats.toString(config.statsOptions) + '\n')
})

/* watch(preloadConfig, function watchHandler (err, stats) {
watch(preloadConfig, function watchHandler (err, stats) {
if (err) {
console.log(err)
return
Expand All @@ -60,7 +60,7 @@ export default function dev () {
}

console.log(stats.toString(config.statsOptions) + '\n')
}) */
})

startDevServer(rendererConfig, config.devServerPort, config.devServerHost, function (err) {
if (err) {
Expand Down
Loading

0 comments on commit fdd1e7d

Please sign in to comment.