Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Broken build due to mangled dependency props

Open
#819 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
build-system

Research direction

Start by reproducing the default and UMD builds with the shown named import and mangle regex, then compare their generated require calls with mangling disabled. Done means calls to the dependency's _fn export remain valid in both builds while local names can still be mangled.

Written by the indexing model from the issue text.

Description

I have some code that imports a named export of a dependency as follows:

import { _fn } from '@x/y';
...
_fn(...); // calling _fn

With mangle configured with "regex": "^_[^_]", the default build (index.js) transpiles this to:

const z = require('@x/y');
...
z.a(...); // calling _fn???

Disabling mangling works as expected:

const z = require('@x/y');
...
z._fn(...); // calling _fn

There is a similar problem with the umd build.

Any way around this?

Dominant language
JavaScript
Stars
8.1k
Forks
358
PR merge metrics
No merged PRs in 30d

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.

More from developit/microbundle

All issues in developit/microbundle

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.