Skip to content

Instantly share code, notes, and snippets.

@jsegomez
Created April 6, 2020 07:26
Show Gist options
  • Save jsegomez/e4ee493fad132a8a83da65b210f94f1f to your computer and use it in GitHub Desktop.
Save jsegomez/e4ee493fad132a8a83da65b210f94f1f to your computer and use it in GitHub Desktop.
Creación de Webpack para Node JS
const path = require('path');
const webpack = require('webpack');

module.exports = {
    entry: './public/js/app.js',
    output: {
        filename: 'bundle.js',
        path: path.join(__dirname, './public/dist')
    },
    module: {
        rules: [{
            test: /\.m?js$/,
            use:{
                loader: 'babel-loader',
                options: {
                    presets: ['@babel/preset-env']
                }
            }
        }]
    }
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment