const path = require('path');
const webpack = require('webpack');
const VENDOR_LIBS = [
"redux",
"redux-thunk"
];
module.exports = {
entry: {
bundle: './src/app.js',
vendor: VENDOR_LIBS
},
output: {
path: path.join(__dirname, 'public'),
filename: '[name].js'
},
module: {
rules: [{
test: /\.js$/,
exclude: /node_modules/,
use: [{
loader: 'babel-loader',
}]
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /.\jpe?g|\.gif|\.png|\.svg|\.woff|\.woff2|\.eot|\.ttf|\.waw|\.mp3|\.ico$/,
loader: 'file-loader'
}
]
},
devtool: 'cheap-module-eval-source-map',
devServer: {
contentBase: path.join(__dirname, 'public')
},
plugins: [
new webpack.ProvidePlugin({
'$': 'jquery',
'jQuery': 'jquery',
'window.$': 'jquery',
'window.jQuery': 'jquery'
})
]
};