Sha256: d32175bc3ad2482636bc415e0a4344944b821d047100835515159c79eab06918

Contents?: true

Size: 1.23 KB

Versions: 5

Compression:

Stored size: 1.23 KB

Contents

const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');

const dist = 'assets'

module.exports = {
  entry: {
    index: path.resolve(__dirname, '../assets/js/index.js'),
    style: path.resolve(__dirname, '../assets/css/style.css'),
    code: path.resolve(__dirname, '../assets/css/code.css'),
  },
  output: {
    path: path.resolve(__dirname, '../.tmp'),
    filename: `${dist}/js/[name].js`
  },
  module: {
    rules: [
      {
        test: /\.m?js$/,
        exclude: /(node_modules)/,
        use: {
          loader: 'babel-loader',
          options: {
            presets: ['@babel/preset-env']
          }
        }
      },
      {
        test: /\.css$/i,
        use: [MiniCssExtractPlugin.loader, 'css-loader'],
      },
    ]
  },
  plugins: [
    new CleanWebpackPlugin(),
    new MiniCssExtractPlugin({
      filename: `${dist}/css/[name].css`,
      chunkFilename: `${dist}/css/[name].css`
    }),
    new CopyPlugin({
      patterns: [
          {
            from: path.resolve(__dirname, '../assets/images/'),
            to: 'assets/images'
          }
      ],
    }),
  ],
};

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
frontman-ssg-0.1.1 project-templates/webpack/webpack/base.config.js
frontman-ssg-0.1.0 project-templates/webpack/webpack/base.config.js
frontman-ssg-0.0.4 project-templates/webpack/webpack/base.config.js
frontman-ssg-0.0.3 project-templates/webpack/webpack/base.config.js
frontman-ssg-0.0.2 project-templates/webpack/webpack/base.config.js