Skip to content

Automatically pick up .terserrcΒ #389

@fregante

Description

@fregante
  • webpack Version: 5.31.0
  • terser-webpack-plugin Version: 5.1.1

Feature Proposal

Configuration could be automatically picked up by looking for .terserrc in the same directory as webpack.config.js like Parcel does:
https://github.com/parcel-bundler/parcel/blob/39ff8330d68c6c0e01d9e8471dd94ce1eb2e62ec/packages/optimizers/terser/src/TerserOptimizer.js#L23

Feature Use Case

Parcel v2 lets me customize the minification step of Tercer by using a configuration file. It'd be great if webpack did this natively as well so that I don't have to install, require, and call new TerserPlugin() in webpack.config.js

.terserc also seen on the standard-things/esm repo, which loads it manually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions