{"size": 1053, "ext": "js", "max_stars_repo_path": "webpack.config.js", "max_stars_repo_name": "LibusoftCicom/pdf417-generator", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "webpack.config.js", "max_issues_repo_name": "LibusoftCicom/pdf417-generator", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "webpack.config.js", "max_forks_repo_name": "LibusoftCicom/pdf417-generator", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.325, "max_line_length": 69, "alphanum_fraction": 0.5726495726}
const path = require("path");
const TerserPlugin = require("terser-webpack-plugin");
const CopyPlugin = require("copy-webpack-plugin");

const distFolder = 'dist/';
const fileName = 'index.js';

module.exports = {
  mode: "production",
  entry: "./lib/pdf417.js",
  output: {
    libraryTarget: "commonjs2",
    path: path.resolve(__dirname, distFolder),
    filename: fileName,
  },
  optimization: {
    minimize: true,
    minimizer: [new TerserPlugin()],
  },
  plugins: [
    new CopyPlugin({
      patterns: [
        path.resolve(__dirname, "README.md"),
        path.resolve(__dirname, "LICENSE"),
        {
            from: path.resolve(__dirname, "package.json"),
            transform(content, absoluteFrom) {
                const package = JSON.parse(content);
                package.main = fileName;
                package.name = "@libusoftcicom/" + package.name,
                delete package.directories;
                return Buffer.from(JSON.stringify(package, null, 4));
            }
        }
        
      ],
    }),
  ],
};
