Skip to content

[UIK-6140][process-css-unplugin] unified css handling in vite for build and serve mode - #3264

Open
slizhevskyv-semrush wants to merge 1 commit into
release/v18from
UIK-6140/process-css-unplugin-vite-unified-trasnform
Open

slizhevskyv-semrush wants to merge 1 commit into
release/v18from
UIK-6140/process-css-unplugin-vite-unified-trasnform

Conversation

@slizhevskyv-semrush

@slizhevskyv-semrush slizhevskyv-semrush commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Changelog

@semcore/process-css-unplugin

Changed

  • The way how CSS is processed in vite for build and serve modes

Motivation and Context

What have changed:

  1. Adopted a unified way for css handling in vite in build and dev/serve mode. In both cases css is moved to dedicated files within node_modules/.vite/semcore-css folder. Tested on vite@6.1.0 with esbuild and vite@8.3.4 with rolldown under the hood.

    BEFORE

Screenshot 2026-10-22 at 11 56 25
AFTER
Screenshot 2026-10-22 at 11 55 43
  1. Changed hash generation. Before it was based on a file path and a content. Now it uses only css file content.
  2. Nothing changed in how css is processed in webpack.
  3. Updated unit tests.

How has this been tested?

I've updated unit tests & tested manually on test stand using vite@6 and vite@8

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Nice improve.

Checklist:

  • I have updated the documentation accordingly.
  • I have added new tests on added of fixed functionality.


const sourceCode = createSourceCode('.___SButton_abc_gg_ { color: red; }');
const result = callTransform(plugin, sourceCode, '/node_modules/@semcore/button/lib/es6/index.js');
const importPath = getImportPath(result.code)!;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const importPath = getImportPath(result.code)!;
const importPath = getImportPath(result.code) ?? '';

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants