
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
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.
@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.
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
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.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.