# @creditas/microfrontend-webpack-config

> Some defaults for webpack configs at Creditas

Latest version **1.5.1** (published 2020-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @creditas/microfrontend-webpack-config
pnpm add @creditas/microfrontend-webpack-config
yarn add @creditas/microfrontend-webpack-config
bun add @creditas/microfrontend-webpack-config
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.1 |
| Published | 2020-06-09 |
| First published | 2019-04-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 20 |
| Unpacked size | 15.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Guilherme Gregio |
| Maintainers | dev-creditas, guilhermegregio, iacono, rafaellucio, valter.martins |
| Keywords | microfrontends, webpack, single-spa, react |

## Links

- npm: https://www.npmjs.com/package/@creditas/microfrontend-webpack-config
- Repository: https://github.com/Creditas/microfrontend-webpack-config
- Homepage: https://github.com/Creditas/microfrontend-webpack-config#readme
- Issues: https://github.com/Creditas/microfrontend-webpack-config/issues
- npm.io page: https://npm.io/package/@creditas/microfrontend-webpack-config

## Dependencies (20)

- [ramda](https://npm.io/package/ramda.md) ^0.27.0
- [dotenv](https://npm.io/package/dotenv.md) ^7.0.0
- [webpack](https://npm.io/package/webpack.md) ^4.30.0
- [css-loader](https://npm.io/package/css-loader.md) ^2.1.1
- [url-loader](https://npm.io/package/url-loader.md) ^1.1.2
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.5.5
- [file-loader](https://npm.io/package/file-loader.md) ^5.0.2
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^9.5.1
- [babel-loader](https://npm.io/package/babel-loader.md) ^8.0.5
- [style-loader](https://npm.io/package/style-loader.md) ^0.23.1
- [webpack-merge](https://npm.io/package/webpack-merge.md) ^4.2.1
- [dotenv-webpack](https://npm.io/package/dotenv-webpack.md) ^1.7.0
- [postcss-loader](https://npm.io/package/postcss-loader.md) ^3.0.0
- [kremling-loader](https://npm.io/package/kremling-loader.md) ^1.0.2
- [react-dev-utils](https://npm.io/package/react-dev-utils.md) ^9.0.0
- [copy-webpack-plugin](https://npm.io/package/copy-webpack-plugin.md) ^5.0.3
- [html-webpack-plugin](https://npm.io/package/html-webpack-plugin.md) ^4.0.0-alpha.7
- [clean-webpack-plugin](https://npm.io/package/clean-webpack-plugin.md) ^2.0.1
- [webpack-bundle-analyzer](https://npm.io/package/webpack-bundle-analyzer.md) ^3.3.2
- [unused-files-webpack-plugin](https://npm.io/package/unused-files-webpack-plugin.md) ^3.4.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.5.1 (latest) — 2020-06-09
- 1.4.0 — 2020-06-09
- 1.3.0 — 2020-03-17
- 1.2.0 — 2020-02-07
- 1.1.4 — 2020-01-08
- 1.1.1 — 2020-01-08
- 1.1.0 — 2019-12-16
- 1.0.15 — 2019-11-06
- 1.0.12 — 2019-08-15
- 1.0.11 — 2019-04-29
- 1.0.10 — 2019-04-29
- 1.0.9 — 2019-04-29
- 1.0.8 — 2019-04-29
- 1.0.7 — 2019-04-26
- 1.0.6 — 2019-04-26
- … 2 more at https://npm.io/package/@creditas/microfrontend-webpack-config/versions

## README

# microfrontend-webpack-config
Some defaults for webpack configs at Creditas.

## Usage
First, install the library as a devDependency.
```bash
yarn add --dev @creditas/microfrontend-webpack-config @babel/runtime @babel/plugin-transform-runtime
```

Now create a webpack.config.js file. This file will use @creditas/microfrontned-webpack-config and allow you to override anything you want to about the defaults. Inside of the
file, call the `webpackConfigModuleApp()` function to get some defaults and add/override to your webpack config. See example below:

```js
// webpack.config.js

const {webpackConfigModuleApp} = require('@creditas/microfrontend-webpack-config')

module.exports = webpackConfigModuleApp('calculator', {
  // Override or add anything you want to your webpack config
  module: {
    rules: [
      // e.g. apply a css loader if using css-modules
      {loader: 'css-loader'},
    ],
  },
})
```

Finally, create the following `scripts` in your package.json:

```json
{
  "scripts": {
    "start": "webpack-dev-server --config ./webpack.config.js --env.standalone",
    "start:single-spa": "webpack-dev-server --config ./webpack.config.js --port 8000",
    "build": "webpack -p --config webpack.config.js --env.analyze=static",
    "analyze": "webpack --config webpack.config.js --env.analyze=server",
  }
}
```

## Debugging
To see your full webpack config, simply add a `--env.debug` to your webpack cli command.

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