Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
webpack-extract-css-hot-reload
Advanced tools
This simple loader was created to hot reload css files which have been extracted with extract-text-webpack-plugin
. Based on css-hot-loader.
First install the package from npm
$ npm install webpack-extract-css-hot-reload --save-dev
Update your webpack.config.ts
. For example
module: {
rules: [
{
test: /\.css$/,
loader: ['webpack-extract-css-hot-reload'].concat(ExtractTextPlugin.extract([
{
loader: 'css-loader',
}, {
loader: 'postcss-loader',
},
]) as any),
},
]
}
NOTE: webpack-extract-css-hot-reload
should be defined before extract-text-webpack-plugin
.
Tag the stylesheets which need hot reloading with data-hot
.
index.html
<!DOCTYPE html>
<html>
<head>
<!-- Roboto font -->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<!-- Own styling -->
<!-- This stylesheet needs to hot reload -->
<link rel="stylesheet" href="build/styles.css" data-hot>
</head>
<body>
...
</body>
</html>
That's all! You're good to go. :)
If you don't like data-hot
for tagging hot reloadable content, then you can pass a custom HTML attribute. For example 'webpack-extract-css-hot-reload?selector=data-lukewarm'
.
MIT License
FAQs
CSS hot reload for extract-text-webpack-plugin
The npm package webpack-extract-css-hot-reload receives a total of 437 weekly downloads. As such, webpack-extract-css-hot-reload popularity was classified as not popular.
We found that webpack-extract-css-hot-reload demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.