mirror of
https://github.com/kremalicious/blowfish.git
synced 2024-11-15 01:25:22 +01:00
27 lines
705 B
JavaScript
27 lines
705 B
JavaScript
const path = require('path')
|
|
const common = require('./webpack.common.config')
|
|
const { spawn } = require('child_process')
|
|
|
|
module.exports = Object.assign({}, common, {
|
|
mode: 'development',
|
|
output: {
|
|
path: path.resolve(__dirname, 'build'),
|
|
filename: 'bundle.js',
|
|
publicPath: '/'
|
|
},
|
|
devtool: 'cheap-source-map',
|
|
devServer: {
|
|
contentBase: path.resolve(__dirname, 'build'),
|
|
stats: 'minimal',
|
|
before: () => {
|
|
spawn('electron', ['.'], {
|
|
shell: true,
|
|
env: process.env,
|
|
stdio: 'inherit'
|
|
})
|
|
.on('close', () => process.exit(0))
|
|
.on('error', spawnError => console.error(spawnError)) // eslint-disable-line no-console
|
|
}
|
|
}
|
|
})
|