# @pieced/js-config-webpack-plugin

> Automatically configuration webpack5 js loader

Latest version **1.1.18** (published 2025-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pieced/js-config-webpack-plugin
pnpm add @pieced/js-config-webpack-plugin
yarn add @pieced/js-config-webpack-plugin
bun add @pieced/js-config-webpack-plugin
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.18 |
| Published | 2025-06-09 |
| First published | 2023-03-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | mingdev |
| Maintainers | adming |
| Keywords | webpack, webpack-plugin |

## Links

- npm: https://www.npmjs.com/package/@pieced/js-config-webpack-plugin
- Homepage: https://github.com/pieced-team/webpack-config
- npm.io page: https://npm.io/package/@pieced/js-config-webpack-plugin

## Dependencies (9)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.21.0
- [babel-loader](https://npm.io/package/babel-loader.md) ^9.1.2
- [react-refresh](https://npm.io/package/react-refresh.md) ^0.17.0
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.20.2
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) ^7.18.6
- [terser-webpack-plugin](https://npm.io/package/terser-webpack-plugin.md) ^5.3.6
- [@pmmmwh/react-refresh-webpack-plugin](https://npm.io/package/@pmmmwh/react-refresh-webpack-plugin.md) ^0.5.16
- [@pieced/babel-plugin-auto-css-modules](https://npm.io/package/@pieced/babel-plugin-auto-css-modules.md) 1.1.18

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.1.18 (latest) — 2025-06-09
- 1.1.15-beta.0 (beta) — 2025-04-17
- 1.1.17 — 2025-05-07
- 1.1.16 — 2025-05-07
- 1.1.15 — 2025-04-17
- 1.1.14 — 2025-04-14
- 1.1.13 — 2025-04-11
- 1.1.12 — 2025-04-10
- 1.1.11 — 2025-04-10
- 1.1.10 — 2025-04-07
- 1.1.9 — 2025-04-07
- 1.1.8 — 2025-04-07
- 1.1.7 — 2025-04-07
- 1.1.6 — 2025-04-07
- 1.1.5 — 2025-04-07
- … 8 more at https://npm.io/package/@pieced/js-config-webpack-plugin/versions

## README

<h1 align="center">@pieced/js-config-webpack-plugin 👋</h1>
<p align="center">
  <a href="https://www.npmjs.com/package/@pieced/js-config-webpack-plugin" target="_blank">
    <img alt="Version" src="https://img.shields.io/npm/v/@pieced/js-config-webpack-plugin.svg">
  </a>
  <a href="https://www.npmjs.com/package/@pieced/js-config-webpack-plugin" target="_blank">
    <img alt="Download" src="https://img.shields.io/npm/dm/@pieced/js-config-webpack-plugin.svg?color=blue" />
  </a>
  <a href="https://www.npmjs.com/package/@pieced/js-config-webpack-plugin" target="_blank">
  <img alt="Webpack" src="https://img.shields.io/badge/webpack->=5.0.0-blue">
  </a>
  <a href="https://www.npmjs.com/package/@pieced/js-config-webpack-plugin" target="_blank">
  <img alt="Last Commit" src="https://img.shields.io/github/last-commit/pieced-team/js-config-webpack-plugin">
  </a>
  <a href="https://www.npmjs.com/package/@pieced/js-config-webpack-plugin" target="_blank">
    <img alt="License: MIT" src="https://img.shields.io/npm/l/@pieced/js-config-webpack-plugin" />
  </a>
</p>

> Automatically configuration webpack5 js loader

## Install

```sh
npm i --save-dev @pieced/js-config-webpack-plugin
```

## Webpack Config

```js
const JsConfigWebpackPlugin = require('@pieced/js-config-webpack-plugin');
module.exports = {
  plugins: [new JsConfigWebpackPlugin()],
};
```

## Options

**suffix**

- `type array`
- `default ['js', 'jsx', 'mjs']`

**filename**

- `type string function (pathData, assetInfo) => string`
- [output.filename](https://webpack.js.org/configuration/output/#outputfilename)
- default

```js
webpack.mode === 'development' ? '[name].js' : 'static/js/[contenthash:10].js'
```

**chunkFilename**

- `type string function (pathData, assetInfo) => string`
- [output.chunkFilename](https://webpack.js.org/configuration/output/#outputchunkfilename)
- default

```js
webpack.mode === 'development' ? '[name].js' : 'static/js/[contenthash:10].js'
```

**terser**

- `type object`
- [terser-webpack-plugin options](https://webpack.js.org/plugins/terser-webpack-plugin/#options)
- default

```js
const defaultTerser = {
  extractComments: false,
  terserOptions: {
    output: {
      comments: false,
    },
    compress: {
      drop_debugger: true,
      drop_console: true,
    },
  },
}
```

---
_Source: https://npm.io/package/@pieced/js-config-webpack-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
