removeddit/webpack.config.js
2018-07-28 23:46:19 +02:00

23 lines
461 B
JavaScript

const path = require('path')
module.exports = (env, argv) => ({
entry: [
'babel-polyfill',
'whatwg-fetch',
'./src/index.js'
],
devServer: {
contentBase: path.resolve(__dirname, 'dist'),
historyApiFallback: true
},
devtool: argv.mode !== 'production' ? 'cheap-module-eval-source-map' : false,
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: 'babel-loader'
}
]
}
})