Last active
November 19, 2016 17:17
-
-
Save khanetor/e186a4b5e22b74aac525 to your computer and use it in GitHub Desktop.
webpack config for Electron project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like
atom
was replaced byelectron
astarget
value. See here: http://webpack.github.io/docs/configuration.html#target