Skip to content

@remotion/bundler: Fork and inline css-loader, resolving security vulnerability#6883

Merged
JonnyBurger merged 3 commits intomainfrom
fork-inline-css-loader
Mar 20, 2026
Merged

@remotion/bundler: Fork and inline css-loader, resolving security vulnerability#6883
JonnyBurger merged 3 commits intomainfrom
fork-inline-css-loader

Conversation

@JonnyBurger
Copy link
Copy Markdown
Member

Summary

  • Replaces the css-loader npm dependency with a stripped-down fork at packages/bundler/css-loader/
  • Keeps only what Remotion actually uses: url() handling and @import processing
  • Removes CSS Modules, ICSS, schema-utils validation, and semver checks
  • Net removal of 8 transitive dependencies (css-loader, schema-utils, semver, icss-utils, postcss-modules-values, postcss-modules-local-by-default, postcss-modules-extract-imports, postcss-modules-scope)

Test plan

  • All 5 bundler tests pass
  • Full repo build (65 packages) succeeds
  • Smoke test: all forked modules load correctly
  • Manual test: verify CSS loading works in Remotion Studio (cd packages/example && bun run dev)

🤖 Generated with Claude Code

Replace the css-loader npm dependency with a stripped-down fork
that only includes what Remotion actually uses (url and import
handling). Removes 8 transitive dependencies including CSS Modules
and ICSS support which were never used.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment Mar 20, 2026 10:02am
remotion Ready Ready Preview, Comment Mar 20, 2026 10:02am

Request Review

@JonnyBurger JonnyBurger changed the title @remotion/bundler: Fork and inline css-loader @remotion/bundler: Fork and inline css-loader, resolving security vulnerability Mar 20, 2026
Copy link
Copy Markdown
Contributor

@pullfrog pullfrog bot left a comment

Choose a reason for hiding this comment

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

Review: @remotion/bundler: Fork and inline css-loader

Critical: Missing variable declaration in index.js

There's a ReferenceError bug in packages/bundler/css-loader/index.js:55plugins is assigned without being declared:

// Line 55 - missing 'const'
plugins = [
  importParser({ ... }),
];

// Should be:
const plugins = [
  importParser({ ... }),
];

This will cause the loader to crash at runtime when processing CSS files. All 5 bundler tests may have passed because they might not exercise the import plugin path, or the error surfaces only during actual CSS bundling.

Other observations

  • Fork is well-scoped: removes CSS Modules, ICSS, schema-utils, and semver checks as advertised
  • MIT license attribution preserved from original css-loader v5.2.7
  • Runtime files (api.js, getUrl.js, cssWithMappingToString.js) look clean
  • No other obvious runtime issues found

Recommendation

Fix the missing const declaration and re-run the bundler tests before merging.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow runpullfrog.com𝕏

@pullfrog
Copy link
Copy Markdown
Contributor

pullfrog bot commented Mar 20, 2026

Fixed the missing const keyword in packages/bundler/css-loader/index.js:55. The original css-loader v5.2.7 source does have const plugins = []; - the PR was missing this declaration. The fix has been pushed to the branch.

Pullfrog  | View workflow run | Triggered by Pullfrogpullfrog.com𝕏

…ckages

Add `@remotion/bundler/css-loader` export so other packages can
use the inlined fork instead of depending on css-loader directly.
Update @remotion/tailwind and @remotion/tailwind-v4 to use it.
Add CssLoaderTest composition to packages/example.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JonnyBurger JonnyBurger merged commit 470da37 into main Mar 20, 2026
18 checks passed
@JonnyBurger JonnyBurger deleted the fork-inline-css-loader branch March 20, 2026 10:19
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.

1 participant