# @theme-tools/plugin-webpack

> Webpack plugin for Theme Tools

Latest version **1.1.0** (published 2018-01-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @theme-tools/plugin-webpack
pnpm add @theme-tools/plugin-webpack
yarn add @theme-tools/plugin-webpack
bun add @theme-tools/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 | 1.1.0 |
| Published | 2018-01-09 |
| First published | 2017-06-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | EvanLovely |
| Maintainers | evanlovely |
| Keywords | webpack, theme-tools-plugin, theme-tools |

## Links

- npm: https://www.npmjs.com/package/@theme-tools/plugin-webpack
- Repository: https://github.com/basaltinc/theme-tools/tree/master/packages/plugin-webpack
- npm.io page: https://npm.io/package/@theme-tools/plugin-webpack

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) ^2.6.8
- [@theme-tools/core](https://npm.io/package/@theme-tools/core.md) ^1.0.0
- [webpack-mild-compile](https://npm.io/package/webpack-mild-compile.md) ^1.0.0

## 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.0 (latest) — 2018-01-09
- 1.0.0 — 2017-10-28
- 0.2.5 — 2017-10-26
- 0.2.4 — 2017-10-09
- 0.2.3 — 2017-10-09
- 0.2.2 — 2017-07-17
- 0.2.1 — 2017-06-26
- 0.2.0 — 2017-06-25

## README

# Webpack Plugin for Theme Tools

> Theme core plugins let you easily pass in configuration and get a set of Gulp-ready task functions back that have sensible defaults and work well together.

# Getting Started

## Install

```bash
npm install @theme-tools/plugin-webpack webpack --save
```

## Configure

Create a `webpack.config.js` [config file](https://webpack.js.org/configuration/).

## Setup

Add this to your `gulpfile.js`:

```js
const gulp = require('gulp');
const webpackTasks = require('@theme-tools/plugin-webpack')(require('webpack.config.js'));

gulp.task('webpack', webpack.compile);
gulp.task('watch:webpack', webpack.watch);
```

# Details

## Tasks

These tasks are methods inside `webpackTasks` from the above code example. You can run them anyway you can run a function, though they are often ran via Gulp. All tasks take a callback function as the first and only parameter that will run when the task is done - exactly how `gulp.task()`, `gulp.parallel()`, and `gulp.series()` want.

### `webpackTasks.compile()` - Compile Webpack

Compile Webpack.

### `webpackTasks.watch()` - Watch Webpack

Watch and recompile Webpack incrementally.

## Configuration

The configuration passed in is the [contents of `webpack.config.js`](https://webpack.js.org/configuration/).

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