🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@financial-times/dotcom-build-css

Package Overview
Dependencies
Maintainers
11
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/dotcom-build-css

This package exports a Webpack plugin to configure it with a way to load CSS source files.

latest
npmnpm
Version
13.5.1
Version published
Maintainers
11
Created
Source

@financial-times/dotcom-build-css

This package exports a Webpack plugin to configure it with a way to load CSS source files.

Getting started

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()]
}

Scope

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

Package last updated on 12 Dec 2025

Did you know?

Socket

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.

Install

Related posts