mui / mui/material-ui

Building and publishing an add-on utility component for MUI

Open
#37,177 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

scope: all components support: question
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Hey folks, I've built a small (TypeScript-enabled) utility component that extends MUI and I want to publish it on npm for easy installation. The component and its dependencies work fine if I copy and paste the files into a project (so far I've tested with Next.js and CRA), but I'm struggling to get it to transpile into a packagable format that doesn't cause a cornucopia of errors.

I've tried babel-loader, ts-loader, a combo of both, with and without webpack, and even though I can get it to generate files, they don't seem to work with React.

Trouble is I'm flying blind and just trying random things hoping they'll work. Now out of desperation, I'm hoping you might be able to point me in the direction of a build system or even documentation I could read that would help me?

Thanks!

Contributor guide

Open the contributing guide

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

No repository file, test, or entry point is identified. Start by reviewing the reported TypeScript, Babel, ts-loader, babel-loader, and webpack attempts; done would mean a packaged npm component installs and works with React, Next.js, and CRA without the reported errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
babel, nextjs, react, typescript, webpack
Domain
build-system, developer-experience, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.