webpack config + babel-loader

This commit is contained in:
Hakim El Hattab
2020-03-31 13:23:51 +02:00
parent e4faf54804
commit ca29e3dd29
5 changed files with 76 additions and 8 deletions

24
webpack.config.js Normal file
View File

@@ -0,0 +1,24 @@
const path = require('path');
module.exports = {
mode: 'production',
entry: ["./js/index.js"],
output: {
path: path.join(__dirname, '/dist'),
filename: 'reveal.min.js',
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules)/,
loader: 'babel-loader',
query: {
presets: [
[ '@babel/preset-env' ],
],
},
},
],
},
};