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

Maybe should compile `node_modules` with babel when use inline dependencies

Open
#936 7 comments 2 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

Research direction

Start by reproducing the inline-dependency example using foo/bar.js and the My module, then trace how the Babel config applies exclude: 'node_modules/**'. Compare the output for the dependency and the local arrow function. Done means inline dependencies receive the intended Babel compilation without changing the behavior for non-inlined dependencies.

Written by the indexing model from the issue text.

Description

Now microbundle is use exclude: 'node_modules/**' to create babel config, I think it's reasonable when not inline dependencies.
But if use inline dependencies... this options maybe is weird?

// foo/bar.js (in node_modules)
module.exports = {a: ()=>console.log('1')}
// My module
import abc from 'foo/bar.js';
window.de = abc

export const b = () => {
  console.log('2')
}

Then add foo module to devDependencies.

Result:

window.de={a:()=>console.log("1")};var o=function(){console.log('2')};export{o as b};

If i use inline dependencies mean i hope it's part of mine module, my modules arrow function has compile (it's right) but foo modules has nothing change.

Maybe should not set exclude: 'node_modules/**' when use inline dependencies?

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.