Skip to content

Webpack Loader with Hot Module Reloading for SolidJS

License

Notifications You must be signed in to change notification settings

solidjs/solid-hot-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

# 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 so that solid-hot-loader is only used for actual component files.

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.

export default MyComponent;

About

Webpack Loader with Hot Module Reloading for SolidJS

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published