
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
svelte-preprocess-postcss
Advanced tools
Preprocess your Svelte component styles with PostCSS!
Uses postcss-load-config under the hood for config loading.
import sveltePreprocessPostcss from 'svelte-preprocess-postcss'
const stylePreprocessor = sveltePreprocessPostcss({
configFilePath: '',
useConfigFile: true,
plugins: [
require('precss')
]
})
preprocessorFunction = sveltePreprocessPostcss([context])If no context is passed in, configuration options are loaded from postcss.config.js or .postcssrc.js starting in the current directory.
If you do pass in a context object/function, it is passed to postcss-load-config.
Besides whatever postcss-load-config does with the context, you can also provide these values:
configFilePath (optional string): If supplied, is used as the root path to use to look for a config file. Defaults to the current working directory.useConfigFile (optional boolean): if false, the preprocessor won't go looking for any configuration file - the plugins property of the context object will be used by itself. Defaults to true.You can both pass in a context object with plugins and whatnot, and also load from a config file - postcss-load-config handles merging those together.
svelte.preprocessconst processed = await svelte.preprocess(source, {
style: stylePreprocessor
})
rollup-plugin-svelteexport default {
plugins: [
svelte({
preprocess: {
style: stylePreprocessor
},
css(css) {
css.write(`public/components.css`)
}
}),
],
}
FAQs
Preprocess your Svelte component styles with PostCSS
We found that svelte-preprocess-postcss 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.