removeddit/webpack.config.js
2021-10-06 22:02:14 +00:00

22 lines
434 B
JavaScript

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