rspack-contrib / rspack-plugin-preact-refresh

Preact refresh plugin for Rspack
MIT License
6 stars 0 forks source link

feat: add new `preactPath` option #7

Closed chenjiahan closed 2 weeks ago

chenjiahan commented 3 weeks ago

Add a new preactPath option, this is useful in a monorepo to specify the correct preact package path.

const path = require("node:path");

new PreactRefreshPlugin({
  preactPath: path.dirname(require.resolve("preact/package.json")),
});