
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
webpack-react-component-name
Advanced tools
webpack-react-component-name is a Webpack plugin that makes your custom React components visible within React Dev Tools and accessible by the React selector logic built into Reflect.
Note: This branch contains the version of this plugin that is compatible with Webpack 5. For support for Webpack 4, see version 4.x of this plugin in our Releases list.
Normally React component names are minified during compilation. This plugin makes these component names available in production bundles by hooking into Webpack's compilation process, traversing the AST looking for React component definitions, and updating the emitted source code to populate the displayName property. This is the property that, when populated, is used by the React Dev Tools extension to determine the name of a component.
Since we emit a displayName
property value for each React component definition
(critically, not every React component instance), using this plugin will
result in a small size increase to your production bundles.
npm install webpack-react-component-name -save-dev
plugins: [
new WebpackReactComponentNamePlugin()
],
{
"parseDependencies": false,
"include": [],
"exclude": []
}
Type: boolean
Default: false
If set true, the plugin will name the components exported from node_modules.
Type: (string | RegExp | (path: string) => boolean)[]
Default: []
If the path matches any of the elements in this array, it will be included if it isn't explicitly excluded.
If the item is a string
, it will use standard glob syntax. If the item is a Regular Expression, the path will be tested against it. If the item is a function, the path will be passed into it for testing.
Type: (string | RegExp | (path: string) => boolean)[]
Default: []
If the path matches any of the elements in this array, it will be excluded.
If the item is a string
, it will use standard glob syntax. If the item is a Regular Expression, the path will be tested against it. If the item is a function, the path will be passed into it for testing.
A truthy result will be excluded.
As you probably know, there is more than one way to define a React component. This
plugin attempts to detect every possible way of defining a component, but there may
be some we've missed. See the /examples
directory and the unit tests for examples
of the different permutations of React component definitions that we currently support.
If we are not detecting one of your components, please either file an Issue containing example source for a component which is not detected, or feel free to open a PR with the fix.
This project is licensed under the terms of the MIT license.
FAQs
Makes React component names public on minified bundles
The npm package webpack-react-component-name receives a total of 7,959 weekly downloads. As such, webpack-react-component-name popularity was classified as popular.
We found that webpack-react-component-name 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.