
Research
/Security News
jscrambler npm Package Compromised in Supply Chain Attack
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.
@ecopages/postcss-processor
Advanced tools
This module provides a PostCSS processor plugin for Ecopages and utility functions for processing CSS files and strings using PostCSS. It includes built-in presets for Tailwind CSS (v3 and v4).
postcss.config.{js,ts,etc} automatically.bunx jsr add @ecopages/postcss-processor
Integrate the processor into your eco.config.ts using one of the available presets.
Includes tailwindcss, autoprefixer, postcss-import, cssnano.
bun add -D tailwindcss@3.4.19
// eco.config.ts
import { ConfigBuilder } from '@ecopages/core';
import { postcssProcessorPlugin } from '@ecopages/postcss-processor';
import { tailwindV3Preset } from '@ecopages/postcss-processor/presets/tailwind-v3';
const config = await new ConfigBuilder().setProcessors([postcssProcessorPlugin(tailwindV3Preset())]).build();
export default config;
Includes @tailwindcss/postcss, autoprefixer, postcss-nested, cssnano, and handles @reference injection for @apply.
bun add -D @tailwindcss/postcss tailwindcss
// eco.config.ts
import path from 'node:path';
import { ConfigBuilder } from '@ecopages/core';
import { postcssProcessorPlugin } from '@ecopages/postcss-processor';
import { tailwindV4Preset } from '@ecopages/postcss-processor/presets/tailwind-v4';
const config = await new ConfigBuilder()
.setProcessors([
postcssProcessorPlugin(
tailwindV4Preset({
referencePath: path.resolve(import.meta.dir, 'src/styles/app.css'),
}),
),
])
.build();
export default config;
By default, the presets target a broad range of modern browsers (>0.3%, not ie 11, not dead, not op_mini all).
To override this, add a browserslist configuration to your package.json or create a .browserslistrc file in your project root. The processor will automatically detect and use your custom configuration.
You can also use a standard postcss.config.js file or pass plugins manually.
Using postcss.config.js:
Create the file in your root, and simply add postcssProcessorPlugin() to your config without arguments.
Manual Configuration:
import { postcssProcessorPlugin } from '@ecopages/postcss-processor';
import myPlugin from 'postcss-my-plugin';
postcssProcessorPlugin({
plugins: {
'my-plugin': myPlugin(),
},
});
Advanced Configuration:
For advanced use cases, use transformation hooks to modify CSS before or after processing:
import { ConfigBuilder } from '@ecopages/core';
import { postcssProcessorPlugin } from '@ecopages/postcss-processor';
const config = await new ConfigBuilder()
.setProcessors([
postcssProcessorPlugin({
// Define a filter for files to process (defaults to /\.css$/)
filter: /\.css$/,
// Provide a function to transform input before processing
transformInput: async (css) => `/* My Custom Header */\n${css}`,
// Provide a function to transform output after processing
transformOutput: async (css) => css.replace('blue', 'red'),
// Explicitly provide plugins (overrides defaults)
plugins: {
/* custom plugins */
},
}),
])
.build();
export default config;
You can use the underlying processor functions directly:
import { PostCssProcessor } from '@ecopages/postcss-processor';
// Process a file
const css = await PostCssProcessor.processPath('path/to/file.css');
// Process a string
const result = await PostCssProcessor.processStringOrBuffer('.class { @apply bg-red-500; }', { filePath: 'style.css' });
FAQs
Postcss processor, transform string or postcss file to css
The npm package @ecopages/postcss-processor receives a total of 523 weekly downloads. As such, @ecopages/postcss-processor popularity was classified as not popular.
We found that @ecopages/postcss-processor demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.

Security News
/Research
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.