jpcn-coder
11/17/2018 - 2:11 PM

PADRAO

um arquivo padrao de webpack

const webpack = require('webpack')

module.exports = {
    entry : './ex/index.js',
    output:{
        path: __dirname + '/public',
        filename : './bundle.js'
    },   
        devServer : {
            port:8080,
            contentBase : './public'
                
        },
        module: {
            rules : [{
                test : /.js?$/,
                loader : 'babel-loader',
                exclude : '/node_modules',
                query:{
                    presets: ['es2015']
                }
            }]
        }   
}