Skip to content

Instantly share code, notes, and snippets.

@khanetor
Last active November 19, 2016 17:17
Show Gist options
  • Save khanetor/e186a4b5e22b74aac525 to your computer and use it in GitHub Desktop.
Save khanetor/e186a4b5e22b74aac525 to your computer and use it in GitHub Desktop.
webpack config for Electron project
'use strict';
const path = require('path');
let config = {
context: path.resolve(__dirname, 'src'),
target: 'electron',
entry: './index',
output: {
path: path.resolve(__dirname, 'built'),
filename: 'bundle.js',
publicPath: '/built/'
},
resolve: {
extensions: ['', '.js', '.jsx', '.css', '.png']
},
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'babel',
query: {
optional: ['runtime'],
stage: 0
},
exclude: /node_modules/
},
{
test: /\.css$/,
loader: 'style!css'
},
{
test: /.png$/,
loader: 'file'
}
]
}
};
module.exports = config;
@eduludi
Copy link

eduludi commented Feb 10, 2016

Looks like atom was replaced by electron as target value. See here: http://webpack.github.io/docs/configuration.html#target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment