
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
rework-importer
Advanced tools
Rework plugin for allowing CSS files to import other CSS files.
To properly use the import plugin you should make sure it's the first you call use on. This allows your other plugins to do their work on the imported CSS.
var rework = require('rework');
var imprt = require('rework-importer');
var fs = require('fs');
// Not recommended way of loading styles...
rework(fs.readFileSync('style.css'), 'utf-8')
.use(imprt({
path: 'style.css',
base: __dirname + '/styles'
})) // opts described below
.use(another-plugin)
.use(another-plugin)
.toString();
Many imports in one block.
style.css
@import {
file: myFirstCSSFile.css;
file: mySecondCSSFile.css
}
myFirstCSSFile.css
body {
background: #000;
}
myFirstCSSFile.css
h1 {
font-size: 200px;
}
Resulting CSS
body {
background: #000;
}
h1 {
font-size: 200px;
}
Or with "native" @import-syntax:
style.css
@import url('foobar.css');
body {
background: #000;
}
foobar.css
* { box-sizing: border-box; }
Resulting CSS
* {
box-sizing: border-box;
}
body {
background: #000;
}
Available options are:
@imports@keyframes or @media declarations.`MIT
FAQs
Import statements for Rework.
We found that rework-importer 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.