webpack/webpack-cli

View on GitHub
packages/generators/loader-template/default/examples/simple/webpack.config.js.tpl

Summary

Maintainability
Test Coverage
const path = require('path');

module.exports = {
  entry: './src/index.js',
  output: {
    path: path.join(__dirname, 'example_dist'),
    filename: '[name].chunk.js',
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        use: [
          {
            loader: 'example-loader',
            options: {},
          },
        ],
      },
    ],
  },
  resolveLoader: {
    alias: {
      'example-loader': require.resolve('../../src/'),
    },
  },
};