Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
gatsby-1-config-extract-plugin
Advanced tools
extract-text-webpack-plugin instance getter for Gatsby v1 plugins
extract-text-webpack-plugin instance getter for Gatsby v1 plugins. Allows all plugins to share the same instance. Should only be used by plugins that output styles for the main entry point and bundle (which is the vast majority of style plugins).
npm install gatsby-1-config-extract-plugin --save-dev
This module exports two named functions, extractTextPlugin
and extractTextFilename
. Note that
Gatsby's webpack config includes the extract plugin instances in the plugins
array, so plugins
that use this module don't need to - just use it's extract
method in your loaders.
extractTextPlugin(stage)
Accepts the current stage name and returns the appropriate extract-text-webpack-plugin instance.
Anywhere you would normally use new ExtractTextPlugin()
, use this instead.
extractTextFilename(stage)
Accepts the current stage name and returns the name of the extracted text output file. Not required for most use cases.
// in gatsby-node.js
const { extractTextPlugin } = require(`gatsby-1-config-extract-plugin`);
exports.modifyWebpackConfig = ({ config, stage }) => {
switch (stage) {
case `build-css`: {
loader: extractTextPlugin(stage).extract(`style`, `css`);
}
}
};
FAQs
extract-text-webpack-plugin instance getter for Gatsby v1 plugins
The npm package gatsby-1-config-extract-plugin receives a total of 1,390 weekly downloads. As such, gatsby-1-config-extract-plugin popularity was classified as popular.
We found that gatsby-1-config-extract-plugin 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
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.