babel / babel/gulp-babel

"exports is not defined" error using gulp-babel

Open
#178 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.3k
Forks
113
PR merge metrics
No merged PRs in 30d

Description

I have this error in the browser in the file that was compiled via gulp-babel.
The part from the gulp task is
.pipe(babel({
presets: ['@babel/preset-env'],
plugins: [
["@babel/plugin-transform-classes"]]
}))

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the gulp task configuration shown in the issue and reproduce the error from the browser-loaded compiled file. Inspect how the Babel preset and class-transform plugin affect the generated output; done means identifying the relevant configuration or compatibility issue and confirming that the compiled browser file no longer raises "exports is not defined".

Written by the indexing model from the issue text.

Assessment

Tech stack
babel, javascript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.