
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
babel-plugin-auto-css-modules
Advanced tools
Automatically import same name CSS modules.
npm
npm install babel-plugin-auto-css-modules
yarn
yarn add babel-plugin-auto-css-modules
For any Javascript modules that you want corresponding CSS simply create a CSS file with the extension .css
and the same name as your Javascript module in the same directory as your Javascript module. For example if you have a component at foo/bar/Baz.js
your corresponding CSS would live at foo/bar/Baz.css
.
Then in your Babel configuration include:
const plugins = []
// Omit CSS modules in the test environment as Jest doesn't know how to handle
// them and they provide no value to Jest tests anyways.
if (NODE_ENV !== 'test') {
plugins.push('babel-plugin-auto-css-modules')
}
module.exports = {
plugins,
}
This plugin will then automatically inject import statements into your Javascript modules to reference the CSS modules. Given the above example, foo/bar/Baz.js
would get import "foo/bar/Baz.css"
at the top of the file.
From here you'll need to configure your bundler of choice to handle CSS modules. If you're using Webpack you may want to check out postcss-loader.
Please see the code of conduct.
Please see the contributing guide.
FAQs
Automatically import same name CSS modules.
The npm package babel-plugin-auto-css-modules receives a total of 108 weekly downloads. As such, babel-plugin-auto-css-modules popularity was classified as not popular.
We found that babel-plugin-auto-css-modules demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.