swc-project / swc-project/swc-node

module-name-mapper to handle CSS

Open
#641 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2k
Forks
95
Avg merge
14d 11h
Merged PRs (30d)
1

Description

I'm trying to use SWC-Node for a React project. Everything works so far, except for handling CSS imports.

With Babel, we used to use the module-name-mapper plugin to replace all .css file with something that exports an empty object.

Is there a way to do this, too?

PS: I created a StackOverflow question with a link to a minimal reproducible example here.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal reproducible example linked from the issue and inspect SWC-Node's existing module import handling. The work is done when CSS imports in the reported React setup resolve to a module exporting an empty object, with coverage for that behavior if the project has a suitable test location.

Written by the indexing model from the issue text.

Assessment

Tech stack
babel, css, react, typescript
Domain
frontend, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.