https://github.com/solidjs/solid-hot-loader
Webpack Loader with Hot Module Reloading for SolidJS
https://github.com/solidjs/solid-hot-loader
Last synced: 10 months ago
JSON representation
Webpack Loader with Hot Module Reloading for SolidJS
- Host: GitHub
- URL: https://github.com/solidjs/solid-hot-loader
- Owner: solidjs
- License: mit
- Created: 2020-01-24T06:08:55.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T05:47:31.000Z (almost 3 years ago)
- Last Synced: 2024-10-29T18:38:18.132Z (over 1 year ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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;
```