
Security News
The Nightmare Before Deployment
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.
@financial-times/dotcom-build-css
Advanced tools
This package exports a Webpack plugin to configure it with a way to load CSS source files.
This package exports a Webpack plugin to configure it with a way to load CSS source files.
This package is compatible with Node 18+ and is distributed on npm.
npm install --save-dev @financial-times/dotcom-build-css
After installing the package you must add it to the list of plugins in your project's webpack.config.js configuration file:
+ const { PageKitCssPlugin } = require('@financial-times/dotcom-build-css')
module.exports = {
plugins: [
+ new PageKitCssPlugin()
]
}
Once setup, this plugin will enable you to use CSS files (.css) as entry points into your source code.
const { PageKitCssPlugin } = require('@financial-times/dotcom-build-css')
module.exports = {
entry: {
styles: path/to/styles.css
},
plugins: [new PageKitCssPlugin()]
}
This plugin adds a rule to the Webpack configuration to handle .css files. It calls the css-loader package to load and parse the source files. The CSS is optimised using css-minimizer-webpack-plugin, which runs cssnano under the hood. The mini-css-extract-plugin is added to generate .css files and the webpack-fix-style-only-entries to clean up any empty JavaScript bundles.
The CSS loader has url() resolution disabled as we don't use, nor recommend, the function currently.
FAQs
This package exports a Webpack plugin to configure it with a way to load CSS source files.
The npm package @financial-times/dotcom-build-css receives a total of 441 weekly downloads. As such, @financial-times/dotcom-build-css popularity was classified as not popular.
We found that @financial-times/dotcom-build-css demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 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.

Security News
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.

Research
/Security News
Impostor NuGet package Tracer.Fody.NLog typosquats Tracer.Fody and its author, using homoglyph tricks, and exfiltrates Stratis wallet JSON/passwords to a Russian IP address.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.