1
0
mirror of https://github.com/kremalicious/blowfish.git synced 2024-12-28 07:37:51 +01:00
blowfish/webpack.dev.config.js
2019-05-05 21:02:59 +02:00

25 lines
633 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: {
publicPath: '/'
},
devtool: 'cheap-source-map',
devServer: {
contentBase: path.resolve(__dirname, 'dist'),
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
}
}
})