1
0
mirror of https://github.com/kremalicious/blowfish.git synced 2024-12-28 15:47:52 +01:00
blowfish/webpack.dev.config.js

27 lines
705 B
JavaScript
Raw Normal View History

2019-05-05 13:34:21 +02:00
const path = require('path')
const common = require('./webpack.common.config')
const { spawn } = require('child_process')
module.exports = Object.assign({}, common, {
mode: 'development',
output: {
2019-05-11 22:55:51 +02:00
path: path.resolve(__dirname, 'build'),
filename: 'bundle.js',
2019-05-05 13:34:21 +02:00
publicPath: '/'
},
devtool: 'cheap-source-map',
devServer: {
2019-05-11 22:55:51 +02:00
contentBase: path.resolve(__dirname, 'build'),
2019-05-05 13:34:21 +02:00
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
}
}
})