gajus / gajus/babel-plugin-lodash-modularize

Problem with babel-register

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
18
Forks
1
PR merge metrics
No merged PRs in 30d

Description

This package works great to reduce the size of the bundle, but when I use it to run my server which has
`require('babel-register');`
it breaks with an error:
```
return _;
^

ReferenceError: _ is not defined
```
any ideas?

here is my .babelrc
```javascript
{
"presets": [
"env",
"es2015",
"stage-0",
"react"
],
"plugins": [
"add-module-exports",
"transform-runtime",
"transform-class-properties",
"rewire",
[
"lodash-modularize",
{
"lodashVersion": "4.0.0"
}
]
]
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure with the reported `require('babel-register')` setup and the provided `.babelrc`. Inspect how the lodash-modularize plugin interacts with the listed Babel presets and plugins, then verify that the server starts without the `ReferenceError: _ is not defined` failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.