# ut-webpack

> Webpack shared config

Latest version **9.1.1** (published 2025-11-12) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install ut-webpack
pnpm add ut-webpack
yarn add ut-webpack
bun add ut-webpack
```

Provides the commands `ut-webpack`, `ut-webpack-dev-server`.

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

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

## Facts

| | |
|---|---|
| Version | 9.1.1 |
| Published | 2025-11-12 |
| First published | 2020-07-13 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14.15.0 |
| Dependencies | 21 |
| Unpacked size | 96.2 MB |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | kalin.krustev |

## Links

- npm: https://www.npmjs.com/package/ut-webpack
- Repository: https://github.com/softwaregroup-bg/ut-webpack
- Homepage: https://github.com/softwaregroup-bg/ut-webpack#readme
- Issues: https://github.com/softwaregroup-bg/ut-webpack/issues
- npm.io page: https://npm.io/package/ut-webpack

## Dependencies (21)

- [sass](https://npm.io/package/sass.md) ^1.94.0
- [webpack](https://npm.io/package/webpack.md) ^4.46.0
- [neutrino](https://npm.io/package/neutrino.md) ^9.5.0
- [sass-loader](https://npm.io/package/sass-loader.md) ^10.0.5
- [webpack-cli](https://npm.io/package/webpack-cli.md) ^3.3.12
- [postcss-clean](https://npm.io/package/postcss-clean.md) ~1.1.0
- [postcss-assets](https://npm.io/package/postcss-assets.md) ^5.0.0
- [postcss-import](https://npm.io/package/postcss-import.md) ^12.0.1
- [postcss-loader](https://npm.io/package/postcss-loader.md) ^3.0.0
- [@neutrinojs/copy](https://npm.io/package/@neutrinojs/copy.md) ^9.5.0
- [@neutrinojs/react](https://npm.io/package/@neutrinojs/react.md) ^9.5.0
- [postcss-preset-env](https://npm.io/package/postcss-preset-env.md) ^6.7.0
- [webpack-dev-server](https://npm.io/package/webpack-dev-server.md) ^3.11.3
- [postcss-merge-rules](https://npm.io/package/postcss-merge-rules.md) ^4.0.3
- [terser-webpack-plugin](https://npm.io/package/terser-webpack-plugin.md) ^4.2.3
- [csp-html-webpack-plugin](https://npm.io/package/csp-html-webpack-plugin.md) ^5.1.0
- [webpack-bundle-analyzer](https://npm.io/package/webpack-bundle-analyzer.md) ^4.4.2
- [compression-webpack-plugin](https://npm.io/package/compression-webpack-plugin.md) ^6.1.1
- [@babel/plugin-proposal-class-properties](https://npm.io/package/@babel/plugin-proposal-class-properties.md) ^7.16.7
- [@babel/plugin-proposal-optional-chaining](https://npm.io/package/@babel/plugin-proposal-optional-chaining.md) ^7.16.7
- [@babel/plugin-proposal-nullish-coalescing-operator](https://npm.io/package/@babel/plugin-proposal-nullish-coalescing-operator.md) ^7.18.6

## Recent versions

- 9.1.1 (latest) — 2025-11-12
- 9.1.0 — 2025-11-12
- 9.0.1 — 2025-11-12
- 8.2.3 — 2022-12-02
- 8.2.2 — 2022-11-06
- 8.2.1 — 2022-10-14
- 8.2.0 — 2022-10-13
- 8.1.0 — 2022-10-06
- 8.0.3 — 2022-06-22
- 8.0.2 — 2022-06-12
- 8.0.1 — 2022-06-12
- 7.9.6 — 2022-05-12
- 7.9.5 — 2022-05-12
- 7.9.4 — 2022-05-03
- 7.9.3 — 2022-05-03
- … 24 more at https://npm.io/package/ut-webpack/versions

## README

# ut-webpack

[Neutrino](https://neutrinojs.org/) based preset for usage with UT framework.

## Usage

1) Install `ut-webpack` globally.
2) Create a `utWebpack.js` file in your project root, with the following content:

    ```js
    module.exports = ({utWebpack}) => ({
        options: {
            mains: {
                admin: 'admin',
                service: 'service',
                solution: 'solution',
                adminPortal: 'adminPortal',
                cmsPortal: 'cmsPortal'
            }
        },
        use: [utWebpack({...options})]
    });
    ```

3) Edit `package.json` to include:

    ```json
    {
        "scripts": {
            "start": "ut-webpack-dev-server --mode development --open",
            "build": "ut-webpack --mode production",
            "release": "ut-webpack --mode production && ut-release"
        }
    }
    ```

Use `npm run start` to start the development server with hot reload enabled.

Use `npm run build` to build the production front end. Rebuild.

## Configuration

The preset accepts the following options as object properties
in the first argument :

- `publicPath` - sets Webpack
  [output.publicPath](https://webpack.js.org/configuration/output/#output-publicpath),
  the default is: `'/a/browser/'`
- `source` - sets Neutrino
  [options.source](https://neutrinojs.org/api/#optionssource),
  the default is: `'browser'`
- `output` - sets Neutrino
  [options.output](https://neutrinojs.org/api/#optionsoutput),
  the default is: `path.resolve('dist')`
- `proxy` - sets Webpack
  [devServer.proxy](https://webpack.js.org/configuration/dev-server/#devserverproxy),
  the default is:

  ```js
    {
        context: ['!/a/browser/**'],
        target: 'http://localhost:8004'
    }
  ```

- `cssImport` - sets postcss-import
  [path](https://www.npmjs.com/package/postcss-import#path),
  the default is: `path.resolve('impl/browser/config')`
- `devModulesPath` - sets Neutrino
  [path](https://neutrinojs.org/webpack-chain/#config-resolve-modules),
  the default is: `dev`
- `csp` - Allows content security options to be passed to
  [csp-html-webpack-plugin](https://www.npmjs.com/package/csp-html-webpack-plugin)
- `html` - Allows html options to be passed to
  [html-webpack-plugin](https://www.npmjs.com/package/html-webpack-plugin)

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