Skip to content
Snippets Groups Projects
Select Git revision
  • ceeb8b0dccb453dc435ee94c1a820a47a85071d8
  • test default
  • master protected
3 results

webpack.config.js

Blame
  • webpack.config.js 663 B
    const path = require('path');
    const BundleTracker = require('webpack-bundle-tracker');
    
    module.exports = {
      mode: "production",
      context: __dirname,
      entry: {
        base: {
          import: path.resolve("static_src", "base.js"),
          dependOn: "shared",
        },
        shared: ["jquery"],
      },
      output: {
        path: path.resolve(__dirname, "shared", "static", "shared"),
        filename: "[name]-[fullhash].js",
      },
      module: {
        rules: [
          {
            test: /\.css$/i,
            use: ["style-loader", "css-loader"],
          },
        ],
      },
      optimization: {
        runtimeChunk: "single",
      },
      plugins: [
        new BundleTracker({filename: './webpack-stats.json'})
      ],
    };