mirror of
https://github.com/desktop/desktop
synced 2024-10-31 11:07:25 +00:00
Add an Error process
This commit is contained in:
parent
d55347feb1
commit
2b3b0d3520
5 changed files with 36 additions and 2 deletions
7
app/src/crash/error-app.tsx
Normal file
7
app/src/crash/error-app.tsx
Normal file
|
@ -0,0 +1,7 @@
|
|||
import * as React from 'react'
|
||||
|
||||
export class ErrorApp extends React.Component<{ }, void> {
|
||||
public render() {
|
||||
return <span>hello world</span>
|
||||
}
|
||||
}
|
13
app/src/crash/index.tsx
Normal file
13
app/src/crash/index.tsx
Normal file
|
@ -0,0 +1,13 @@
|
|||
import * as React from 'react'
|
||||
import * as ReactDOM from 'react-dom'
|
||||
|
||||
import { ErrorApp } from './error-app'
|
||||
|
||||
const container = document.createElement('div')
|
||||
container.id = 'desktop-crash-container'
|
||||
document.body.appendChild(container)
|
||||
|
||||
ReactDOM.render(
|
||||
<ErrorApp />,
|
||||
document.getElementById('desktop-app-container')!
|
||||
)
|
|
@ -121,11 +121,23 @@ const askPassConfig = merge({}, commonConfig, {
|
|||
target: 'node',
|
||||
})
|
||||
|
||||
const crashConfig = merge({}, commonConfig, {
|
||||
entry: { shared: path.resolve(__dirname, 'src/crash/index') },
|
||||
target: 'electron-renderer',
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
'filename': 'crash.html',
|
||||
'chunks': ['crash']
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
||||
module.exports = {
|
||||
main: mainConfig,
|
||||
shared: sharedConfig,
|
||||
renderer: rendererConfig,
|
||||
askPass: askPassConfig,
|
||||
crash: crashConfig,
|
||||
replacements: replacements,
|
||||
externals: commonConfig.externals,
|
||||
}
|
||||
|
|
|
@ -36,5 +36,6 @@ const rendererConfig = merge({}, common.renderer, config, {
|
|||
})
|
||||
|
||||
const sharedConfig = merge({}, common.shared, config, { })
|
||||
const crashConfig = merge({}, common.crash, config, { })
|
||||
|
||||
module.exports = [ mainConfig, sharedConfig, rendererConfig, askPassConfig ]
|
||||
module.exports = [ mainConfig, sharedConfig, rendererConfig, askPassConfig, crashConfig ]
|
||||
|
|
|
@ -39,6 +39,7 @@ const config = {
|
|||
const mainConfig = merge({}, common.main, config)
|
||||
const sharedConfig = merge({}, common.shared, config)
|
||||
const askPassConfig = merge({}, common.askPass, config)
|
||||
const crashConfig = merge({}, common.crash, config, { })
|
||||
|
||||
const rendererConfig = merge({}, common.renderer, config, {
|
||||
module: {
|
||||
|
@ -61,4 +62,4 @@ const rendererConfig = merge({}, common.renderer, config, {
|
|||
]
|
||||
})
|
||||
|
||||
module.exports = [ mainConfig, sharedConfig, rendererConfig, askPassConfig ]
|
||||
module.exports = [ mainConfig, sharedConfig, rendererConfig, askPassConfig, crashConfig ]
|
||||
|
|
Loading…
Reference in a new issue