# @hisystems/snowpack-plugin-webpack

> Use Webpack to bundle your application for production.

Latest version **2.0.6** (published 2020-08-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hisystems/snowpack-plugin-webpack
pnpm add @hisystems/snowpack-plugin-webpack
yarn add @hisystems/snowpack-plugin-webpack
bun add @hisystems/snowpack-plugin-webpack
```

## 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 | 2.0.6 |
| Published | 2020-08-24 |
| First published | 2020-08-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 13.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | caiusrsm |

## Links

- npm: https://www.npmjs.com/package/@hisystems/snowpack-plugin-webpack
- npm.io page: https://npm.io/package/@hisystems/snowpack-plugin-webpack

## Dependencies (11)

- [glob](https://npm.io/package/glob.md) ^7.1.6
- [jsdom](https://npm.io/package/jsdom.md) ^16.2.2
- [core-js](https://npm.io/package/core-js.md) ^3.5.0
- [webpack](https://npm.io/package/webpack.md) ^4.43.0
- [css-loader](https://npm.io/package/css-loader.md) ^3.5.3
- [file-loader](https://npm.io/package/file-loader.md) ^6.0.0
- [babel-loader](https://npm.io/package/babel-loader.md) ^8.1.0
- [terser-webpack-plugin](https://npm.io/package/terser-webpack-plugin.md) ^3.0.1
- [mini-css-extract-plugin](https://npm.io/package/mini-css-extract-plugin.md) ^0.9.0
- [optimize-css-assets-webpack-plugin](https://npm.io/package/optimize-css-assets-webpack-plugin.md) ^5.0.3
- [@open-wc/webpack-import-meta-loader](https://npm.io/package/@open-wc/webpack-import-meta-loader.md) ^0.4.7

## Recent versions

- 2.0.6 (latest) — 2020-08-24
- 2.0.4 — 2020-08-21

## README

# @hisystems/snowpack-plugin-webpack

Use Webpack to bundle your application for production.

```
npm install --save-dev @hisystems/snowpack-plugin-webpack
```

```js
// snowpack.config.json
{
  "plugins": [["@hisystems/snowpack-plugin-webpack", { /* see "Plugin Options" below */}]]
}
```

#### Default Build Script

```js
{
  "scripts": {"bundle:*": "@hisystems/snowpack-plugin-webpack"}
}
```

### Plugin Options

- `sourceMap: boolean` - Enable sourcemaps in the bundled output.
- `outputPattern: {css: string, js: string, assets: string}` - Set the URL for your final bundled files. This is where they will be written to disk in the `build/` directory. See Webpack's [`output.filename`](https://webpack.js.org/configuration/output/#outputfilename) documentation for examples of valid values.
- `extendConfig: (config: WebpackConfig) => WebpackConfig` - extend your webpack config, see below.

#### Extending The Default Webpack Config

The `extendConfig` option is a function that you can provide to configure the default webpack config. If you provide this function, the plugin will pass its return value to `webpack.compile()`. Use this to make changes, add plugins, configure loaders, etc.

Note that this requires you use a `snowpack.config.js` JavaScript config file. JSON configuration cannot represent a function.

```js
// snowpack.config.js
module.exports = {
  plugins: [
    [
      "@hisystems/snowpack-plugin-webpack",
      {
        extendConfig: (config) => {
          config.plugins.push(/* ... */);
          return config;
        },
      },
    ],
  ],
};
```

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