1. Create application directory for webpack project.

    mkdir app && cd app
  2. Install dependent node modules

    npm init --yes
    npm install webpack webpack-dev-server html-webpack-plugin --save-dev
    
  3. Create a sample javascript file(app.js)

    document.write('<h1>Hello World!</h1>');
    
  4. Create a sample webpack configuration file(webpack.config.js)

    var HtmlWebpackPlugin = require('html-webpack-plugin');
    module.exports = {
        entry: './app.js',
        output: {
            path: (__dirname + '/.build'),
            filename: 'app.js'
        },
        plugins: [
            new HtmlWebpackPlugin()
        ]
    };
  5. Run Webpack dev server

    ./node_modules/.bin/webpack-dev-server --open --inline
  6. Open the application http://localhost:8080/

Just a hello world program

def hello
  puts "hello world"
end