Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
css-modules-loader-core-btd
Advanced tools
A loader-agnostic CSS Modules implementation, based on PostCSS
A loader-agnostic CSS Modules implementation, based on PostCSS
import Core from 'css-modules-loader-core'
let core = new Core()
Processes the input CSS sourceString
, looking for dependencies such as @import
or :import
. Any localisation will happen by prefixing a sanitised version of sourcePath
When dependencies are found, it will ask the pathFetcher
for each dependency, resolve & inline any imports, and return the following object:
injectableSource
: the final, merged CSS file without @import
or :import
statementsexportTokens
: the mapping from local name to scoped name, as described in the file's :export
blockThese should map nicely to what your build-tool-specific loader needs to do its job.
The default set of plugins is [postcss-modules-local-by-default, postcss-modules-extract-imports, postcss-modules-scope] (i.e. the CSS Modules specification). This can override which PostCSS plugins you wish to execute, e.g.
import Core from 'css-loader-core'
import autoprefixer from 'autoprefixer'
import colorFunctions from 'postcss-color-function'
// Don't run local-by-default, but use colorFunctions
// beforehand and autoprefixer afterwards:
let core = new Core([
colorFunctions,
core.plugins.extractImports,
core.plugins.scope,
autoprefixer("Last 2 Versions")
])
FAQs
A loader-agnostic CSS Modules implementation, based on PostCSS
The npm package css-modules-loader-core-btd receives a total of 2 weekly downloads. As such, css-modules-loader-core-btd popularity was classified as not popular.
We found that css-modules-loader-core-btd 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.