babel / babel/babel-loader

include / exclude not behaving as expected

Open
#759 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.8k
Forks
456
Avg merge
9h 19m
Merged PRs (30d)
2

Description

**I'm submitting a bug report**

**Webpack Version:**
4.28.3

**Babel Core Version**:
7.2.2

**Babel Loader Version**:
8.0.5

**Please tell us about your environment:**
OSX 10.x

**Current behavior:**

Does not parse files I've both explicitly included and explicitly not excluded. Demo of bug here:

https://github.com/apolitical/babel-include-exclude-bug

Built file correctly transforms out arrow function but not query-string

**Expected/desired behavior:**

`exclude: () => false` means not excluded
`include: () => true` means included

Contributor guide

Open the contributing guide

Research direction

Start by running the reproduction at https://github.com/apolitical/babel-include-exclude-bug with webpack 4.28.3, Babel 7.2.2, and babel-loader 8.0.5. Trace babel-loader's include and exclude handling and compare the arrow-function and query-string transformations. Done means include: () => true includes the file and exclude: () => false does not exclude it, with regression coverage for both cases.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.