Sha256: 18b6a35df15434ae106150b5cf1ad57e87f27a40b48f6a0100617f0cbdc61bb7

Contents?: true

Size: 1.92 KB

Versions: 29

Compression:

Stored size: 1.92 KB

Contents

const path = require("path");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const ManifestPlugin = require("webpack-manifest-plugin");

module.exports = {
  entry: "./frontend/javascript/index.js",
  devtool: "source-map",
  // Set some or all of these to true if you want more verbose logging:
  stats: {
    modules: false,
    builtAt: false,
    timings: false,
    children: false,
  },
  output: {
    path: path.resolve(__dirname, "output", "_bridgetown", "static", "js"),
    filename: "all.[contenthash].js",
  },
  resolve: {
    extensions: [".js", ".jsx"],
  },
  plugins: [
    new MiniCssExtractPlugin({
      filename: "../css/all.[contenthash].css",
    }),
    new ManifestPlugin({
      fileName: path.resolve(__dirname, ".bridgetown-webpack", "manifest.json"),
    }),
  ],
  module: {
    rules: [
      {
        test: /\.(js|jsx)/,
        use: {
          loader: "babel-loader",
          options: {
            presets: ["@babel/preset-env"],
            plugins: [
              ["@babel/plugin-proposal-decorators", { "legacy": true }],
              ["@babel/plugin-proposal-class-properties", { "loose" : true }],
              [
                "@babel/plugin-transform-runtime",
                {
                  helpers: false,
                },
              ],
            ],
          },
        },
      },
      {
        test: /\.(s[ac]|c)ss$/,
        use: [
          MiniCssExtractPlugin.loader,
          "css-loader",
          {
            loader: "sass-loader",
            options: {
              sassOptions: {
                includePaths: [
                  path.resolve(__dirname, "src/_components")
                ],
              },
            },
          },
        ],
      },
      {
        test: /\.woff2?$|\.ttf$|\.eot$|\.svg$/,
        loader: "file-loader",
        options: {
          outputPath: "../fonts",
          publicPath: "../fonts",
        },
      },
    ],
  },
};

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
serbea-1.0.0 docs/webpack.config.js
serbea-0.12 docs/webpack.config.js
serbea-0.11.5 docs/webpack.config.js
serbea-0.11.4 docs/webpack.config.js
serbea-0.11.3 docs/webpack.config.js
serbea-0.11.2 docs/webpack.config.js
serbea-0.11.1 docs/webpack.config.js
bridgetown-core-0.18.6 lib/site_template/webpack.config.js
bridgetown-core-0.18.5 lib/site_template/webpack.config.js
bridgetown-core-0.18.4 lib/site_template/webpack.config.js
bridgetown-core-0.18.3 lib/site_template/webpack.config.js
bridgetown-core-0.18.2 lib/site_template/webpack.config.js
bridgetown-core-0.18.1 lib/site_template/webpack.config.js
bridgetown-core-0.18.0 lib/site_template/webpack.config.js
bridgetown-core-0.17.1 lib/site_template/webpack.config.js
bridgetown-core-0.17.0 lib/site_template/webpack.config.js
bridgetown-core-0.16.0 lib/site_template/webpack.config.js
bridgetown-core-0.16.0.beta2 lib/site_template/webpack.config.js
bridgetown-core-0.16.0.beta1 lib/site_template/webpack.config.js
bulmatown-1.0.5 example/webpack.config.js