github-desktop/webpack.development.js

36 lines
872 B
JavaScript
Raw Normal View History

2016-05-24 19:12:06 +00:00
'use strict'
2016-05-11 16:16:32 +00:00
2016-05-24 19:12:06 +00:00
const common = require('./webpack.common')
const webpack = require('webpack')
const webpackTargetElectronRenderer = require('webpack-target-electron-renderer')
const config = {
2016-05-11 16:16:32 +00:00
devtool: 'cheap-module-eval-source-map',
entry: [
'webpack-hot-middleware/client?path=http://localhost:3000/__webpack_hmr',
2016-05-24 19:12:06 +00:00
...common.entry
2016-05-11 16:16:32 +00:00
],
output: {
2016-05-24 19:12:06 +00:00
filename: common.output.filename,
path: common.output.path,
libraryTarget: common.output.libraryTarget,
2016-05-11 16:16:32 +00:00
publicPath: 'http://localhost:3000/build/'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new webpack.DefinePlugin({
__DEV__: true
2016-05-11 16:16:32 +00:00
})
],
2016-05-24 19:12:06 +00:00
module: common.module,
resolve: common.resolve,
2016-05-11 16:16:32 +00:00
target: 'electron',
2016-05-24 19:12:06 +00:00
externals: common.externals
2016-05-11 16:16:32 +00:00
}
config.target = webpackTargetElectronRenderer(config)
module.exports = config