# @hadeshe93/wpconfig-core

> A convenient configs lib for webpack 5+.

Latest version **0.2.0** (published 2023-03-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install @hadeshe93/wpconfig-core
pnpm add @hadeshe93/wpconfig-core
yarn add @hadeshe93/wpconfig-core
bun add @hadeshe93/wpconfig-core
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2023-03-14 |
| First published | 2022-10-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 29 |
| Unpacked size | 168.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | hadeshe93 |
| Maintainers | hadeshe93 |

## Links

- npm: https://www.npmjs.com/package/@hadeshe93/wpconfig-core
- Repository: https://github.com/hadeshe93/wpconfig
- Homepage: https://github.com/hadeshe93/wpconfig#readme
- Issues: https://github.com/hadeshe93/wpconfig/issues
- npm.io page: https://npm.io/package/@hadeshe93/wpconfig-core

## Dependencies (29)

- [less](https://npm.io/package/less.md) ^4.1.3
- [debug](https://npm.io/package/debug.md) ^4.3.4
- [core-js](https://npm.io/package/core-js.md) ^3
- [postcss](https://npm.io/package/postcss.md) ^8.4.16
- [tapable](https://npm.io/package/tapable.md) ^2.2.1
- [webpack](https://npm.io/package/webpack.md) ^5.74.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.1.0
- [cross-env](https://npm.io/package/cross-env.md) ^7.0.3
- [node-sass](https://npm.io/package/node-sass.md) ^7.0.3
- [css-loader](https://npm.io/package/css-loader.md) ^6.7.1
- [typescript](https://npm.io/package/typescript.md) ^4.8.3
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.14.5
- [less-loader](https://npm.io/package/less-loader.md) ^11.0.0
- [sass-loader](https://npm.io/package/sass-loader.md) ^13.0.2
- [babel-loader](https://npm.io/package/babel-loader.md) ^8.2.5
- [style-loader](https://npm.io/package/style-loader.md) ^3.3.1
- [webpack-chain](https://npm.io/package/webpack-chain.md) ^6.5.1
- [webpack-merge](https://npm.io/package/webpack-merge.md) ^5.8.0
- [postcss-loader](https://npm.io/package/postcss-loader.md) ^7.0.1
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.14.5
- [find-node-modules](https://npm.io/package/find-node-modules.md) ^2.1.3
- [postcss-preset-env](https://npm.io/package/postcss-preset-env.md) ^7.7.2
- [html-webpack-plugin](https://npm.io/package/html-webpack-plugin.md) ^5.5.0
- [clean-webpack-plugin](https://npm.io/package/clean-webpack-plugin.md) ^4.0.0
- [@babel/runtime-corejs3](https://npm.io/package/@babel/runtime-corejs3.md) ^7.18.3
- [mini-css-extract-plugin](https://npm.io/package/mini-css-extract-plugin.md) ^2.6.1
- [@babel/preset-typescript](https://npm.io/package/@babel/preset-typescript.md) ^7.16.7
- [add-asset-html-webpack-plugin](https://npm.io/package/add-asset-html-webpack-plugin.md) ^5.0.2
- [@babel/plugin-transform-runtime](https://npm.io/package/@babel/plugin-transform-runtime.md) ^7.18.2

## Recent versions

- 0.2.0 (latest) — 2023-03-14
- 0.1.15 — 2023-01-05
- 0.1.14 — 2023-01-04
- 0.1.13 — 2022-12-30
- 0.1.11 — 2022-12-30
- 0.1.10 — 2022-12-29
- 0.1.9 — 2022-12-29
- 0.1.8 — 2022-12-29
- 0.1.7 — 2022-12-28
- 0.1.6 — 2022-11-29
- 0.1.5 — 2022-11-29
- 0.1.4 — 2022-11-23
- 0.1.3 — 2022-10-20
- 0.1.2 — 2022-10-19
- 0.1.1 — 2022-10-18

## README

A convenient configs lib for webpack 5+.

## Installation

```sh
$ npm install @hadeshe93/wpconfig-core --save
```

## Usage

First of all, we recommend this architecture in your web app project:

```
.
├── node_modules
├── package.json
├── public
│   ├── favicon.ico
│   └── index.html
├── src
│   ├── common
│   ├── pages # put different web app pages
│   │   ├── demo1
│   │   │   ├── app.vue
│   │   │   ├── main.ts # entry for builder
│   │   │   ├── project.config.js
│   │   └── demo2
│   └── types
└── tsconfig.json
```

Use it in `CJS` format:

```js
const { getDevChainConfig } = require('@hadeshe93/wpconfig-core');

// return a WebpackChainConfig instance
const devChainConfig = getDevChainConfig({
  projectPath: '/path/to/project',
  page: 'demo1',
});
// get config in json format
const webpackConfig = devChainConfig.toConfig();
// ...
```

Use it in `ESM` format:

```js
import { getDevChainConfig } from '@hadeshe93/wpconfig-core';

// return a WebpackChainConfig instance
const devChainConfig = getDevChainConfig({
  projectPath: '/path/to/project',
  page: 'demo1',
});
// get config in json format
const webpackConfig = devChainConfig.toConfig();
// ...
```

---
_Source: https://npm.io/package/@hadeshe93/wpconfig-core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
