
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
@prefresh/webpack
Advanced tools
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,
};
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 @prefresh/babel-plugin
to your babel-configuration
to make this
work together.
We need to be able to recognise your components, this means that components should
start with a capital letter and hook should start with use
followed by a capital letter.
This allows the Babel plugin to effectively recognise these.
Do note that a component as seen below is not named.
export default () => {
return <p>Want to refresh</p>;
};
Instead do:
const Refresh = () => {
return <p>Want to refresh</p>;
};
export default Refresh;
When you are working with HOC's be sure to lift up the displayName
so we can
recognise it as a component.
FAQs
A webpack plugin to enable fast-refresh for Preact components.
The npm package @prefresh/webpack receives a total of 18,061 weekly downloads. As such, @prefresh/webpack popularity was classified as popular.
We found that @prefresh/webpack demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.