github.com/fastly/cli@v1.7.2-0.20240304164155-9d0f1d77c3bf/pkg/commands/compute/testdata/build/javascript/webpack.config.js (about)

     1  const path = require("path");
     2  const webpack = require("webpack");
     3  
     4  module.exports = {
     5    entry: "./src/index.js",
     6    optimization: {
     7      minimize: true
     8    },
     9    target: "webworker",
    10    output: {
    11      filename: "index.js",
    12      path: path.resolve(__dirname, "bin"),
    13      libraryTarget: "this",
    14    },
    15    plugins: [
    16      new webpack.ProvidePlugin({
    17        URL: "core-js/web/url",
    18      }),
    19    ],
    20  };