JSPM

  • Created
  • Published
  • Downloads 35008
  • Score
    100M100P100Q149608F
  • License MIT

Package Exports

  • @prefresh/webpack

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@prefresh/webpack) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Prefresh-webpack

Experimental package

npm version

Setup

npm i -s @prefresh/webpack
## OR
yarn add @prefresh/webpack 

Then add it to your webpack config by doing

import PreactRefreshPlugin from '@prefresh/webpack';

const config = {
  plugins: [
    new webpack.HotModuleReplacementPlugin(),
    new PreactRefreshPlugin(),
  ],
  devServer: {
    hot: true, // ensure dev-server.hot is on
    ...moreDevServerConfig
  },
  ...moreWebpackConfig
}

Using hooks

If you're using preact/hooks you'll need something extra to ensure we can handle changes in hooks well.

You'll need to add react-refresh/babel to your babel-configuration to make this work together.