
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.
isomorphic-style
Advanced tools
npm install --save isomorphic-style
$ npm install isomorphic-style --save-dev
{
module: {
rules: [
{
test: /\.css$/,
use: [
{
loader: 'isomorphic-style/loader',
options: {
insertAt: 'istyle_loc',
prefix: 'istyle_',
},
},
{
loader: `css-loader?modules&importLoaders=1&localIdentName=${CSS_IDENT_NAME}`,
},
{
loader: 'postcss-loader', // for postcss, optional
},
],
}
]
}
}
// MyComponent.css
.Block {
background-color: lightgray;
}
.Title {
font-weight: bold;
font-size: 20px;
}
// MyComponent.js
import React from 'react';
import { Styled } from 'isomorphic-style';
import style from './MyComponent.css';
export default class MyComponent extends React.Component {
return (
<Styled by={style}>
<div className={style.Block}>
<h1 className={style.Title}>MyComponent!</h1>
</div>
</Styled>
);
}
import { collectStyles } from 'isomorphic-style';
...
const [styles, body] = collectStyles(() => ReactDOMServer.renderToString(
<Provider store={store}>
<RouterContext {...renderProps} />
</Provider>,
));
// res is express Response object
res.send(`
<html>
<head>
${styles.join()}
<style id="istyle_loc"></style>
<link rel="stylesheet" href="skin.css" />
</head>
<body>
<div id="App">
${body}
</div>
<script src="main.js"></script>
</body>
</html>
`);
...
The MIT License © 2017-2018 Bin Hou. All rights reserved.
Original isomorphic-style-loader code is Copyright © 2015-2016 Kriasoft, LLC. covered under MIT license.
FAQs
Isomorphic CSS Style component for React & Webpack
We found that isomorphic-style 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.