2016-11-22 21:19:08 +01:00
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
const PATHS = {
|
|
|
|
app: path.join(__dirname, 'app'),
|
|
|
|
dist: path.join(__dirname, 'dist')
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = {
|
2017-01-01 04:56:03 +01:00
|
|
|
entry: ['babel-polyfill', './js/main.js'],
|
2016-11-22 21:19:08 +01:00
|
|
|
output: {
|
2017-01-26 18:40:44 +01:00
|
|
|
path: path.join(PATHS.dist, 'js'),
|
2016-11-22 22:07:23 +01:00
|
|
|
publicPath: '/js/',
|
2016-11-22 21:19:08 +01:00
|
|
|
filename: "bundle.js"
|
|
|
|
},
|
|
|
|
devtool: 'source-map',
|
|
|
|
module: {
|
|
|
|
preLoaders: [
|
|
|
|
{
|
|
|
|
test: /\.jsx?$/,
|
|
|
|
loaders: ['eslint'],
|
|
|
|
// define an include so we check just the files we need
|
|
|
|
include: PATHS.app
|
|
|
|
}
|
|
|
|
],
|
|
|
|
loaders: [
|
|
|
|
{ test: /\.css$/, loader: "style!css" },
|
|
|
|
{
|
2017-01-12 19:26:36 +01:00
|
|
|
test: /\.jsx?$/,
|
|
|
|
loader: 'babel',
|
2017-01-09 09:54:52 +01:00
|
|
|
query: {
|
|
|
|
cacheDirectory: true,
|
2017-01-24 20:07:50 +01:00
|
|
|
presets:[ 'es2015', 'react', 'stage-2' ]
|
2017-01-09 09:54:52 +01:00
|
|
|
}
|
2016-11-22 21:19:08 +01:00
|
|
|
}
|
|
|
|
]
|
2017-01-19 10:50:08 +01:00
|
|
|
},
|
|
|
|
target: 'electron-main',
|
2017-04-20 16:45:39 +02:00
|
|
|
};
|