lbry-desktop/webpack.config.js
Alex Liebowitz b3ee6a837f Update Webpack preset list
For now we only need the Stage 2 Babel plugin, not stage 3
2017-01-24 19:25:23 -05:00

38 lines
762 B
JavaScript

const path = require('path');
const PATHS = {
app: path.join(__dirname, 'app'),
dist: path.join(__dirname, 'dist')
};
module.exports = {
entry: ['babel-polyfill', './js/main.js'],
output: {
path: path.join(PATHS.dist, 'js'),
publicPath: '/js/',
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" },
{
test: /\.jsx?$/,
loader: 'babel',
query: {
cacheDirectory: true,
presets:[ 'es2015', 'react', 'stage-2' ]
}
}
]
}
};