# solid-hot-loader

> A Webpack Loader to add Hot Module Replacement to SolidJS

Latest version **0.0.5** (published 2021-06-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install solid-hot-loader
pnpm add solid-hot-loader
yarn add solid-hot-loader
bun add solid-hot-loader
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2021-06-28 |
| First published | 2020-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Ryan Carniato |
| Maintainers | ryansolid |

## Links

- npm: https://www.npmjs.com/package/solid-hot-loader
- Repository: https://github.com/ryansolid/solid-hot-loader
- Homepage: https://github.com/ryansolid/solid-hot-loader#readme
- Issues: https://github.com/ryansolid/solid-hot-loader/issues
- npm.io page: https://npm.io/package/solid-hot-loader

## Dependencies (1)

- [loader-utils](https://npm.io/package/loader-utils.md) ^2.0.0

## Recent versions

- 0.0.5 (latest) — 2021-06-28
- 0.0.4 — 2021-02-19
- 0.0.3 — 2020-03-25
- 0.0.2 — 2020-02-10
- 0.0.1 — 2020-01-24

## README

# Solid Hot Loader

This loader is intended to wrap your Solid Components for HMR automatically. At this time this plugin cannot preserve downstream state so the Component and all its children are replaced.

## Installation

```bash
# NPM
$ npm install --save-dev solid-hot-loader
```

## Usage

You need to add this library to your webpack config. Note that you should carefuly set webpack's [rule condition](https://webpack.js.org/configuration/module/#rule-conditions) so that `solid-hot-loader` is only used for actual component files.

```js
module.exports = {
  module: {
    rules: [
      {
        test: /\.jsx/,
        use: ['solid-hot-loader'],
        // If and only if all your components are in `path/to/components` directory
        include: path.resolve(__dirname, 'path/to/components')
      }
    ]
  }
}
```

And you have to export each component as default export.

```js
export default MyComponent;
```

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