
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
webpack-create-react-file
Advanced tools
Webpack create react file The plugin automatically create component file (js or jsx) and style file with cssmodule
The plugin automatically create component file (js or jsx) and style file with cssmodule
npm install webpack-create-react-file --save-dev
const path = require('path');
const WebpackCreateReactFile = require('webpack-create-react-file');
module.exports = {
...
plugins: [
new WebpackCreateReactFile({
path: path.resolve(__dirname, './src/components/'),
language: 'jsx',
beauty: ' ',
style: {
filename: 'style.scss',
objectCssModule: 'styles'
}
})
]
...
}
Create folder: foo
Auto create file: foo.jsx
foo
└── foo.jsx
foo.jsx CONTENT BASIC:
import React, {Component} from 'react';
import styles from './style.scss';
class ComponentName extends Component {
constructor(props) {
super(props);
}
render() {
return(
<div></div>
)
}
}
export default ComponentName;
Options
style: {
filename: 'style.scss', // filename style component
objectCssModule: 'styles'
}
Write class with cssmodule
import React, {Component} from 'react';
import styles from './style.scss';
class ComponentName extends Component {
constructor(props) {
super(props);
}
render() {
return(
<div className={styles.component}>
<h2 class={styles.title}></h2>
</div>
)
}
}
export default ComponentName;
style.scss
Automatically create file style:
// component
.component {
}
// style
.style {
}
FAQs
Webpack create react file The plugin automatically create component file (js or jsx) and style file with cssmodule
We found that webpack-create-react-file 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.