brigand / brigand/babel-plugin-flow-react-proptypes

support webpack5

Open
#234 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
427
Forks
42
PR merge metrics
No merged PRs in 30d

Description

I'm using [react-virtualized](https://github.com/bvaughn/react-virtualized) which uses this plugin,
and when I tried to migrate to webpack 5 from webpack 4, got this error.
```
Error: Cannot get final name for export 'babelPluginFlowReactPropTypes_proptype_AnimationTimeoutId' of ./node_modules/react-virtualized/dist/es/utils/requestAnimationTimeout.js
while generating the root export 'babelPluginFlowReactPropTypes_proptype_AnimationTimeoutId' (used name: 'rM')
at getFinalBinding (/Users/xx/Desktop/xx/chat/node_modules/webpack/lib/optimize/ConcatenatedModule.js:467:10)
at getFinalName (/Users/xx/Desktop/xx/chat/node_modules/webpack/lib/optimize/ConcatenatedModule.js:523:18)
at /Users/xx/Desktop/xx/chat/node_modules/webpack/lib/optimize/ConcatenatedModule.js:1387:24
at ConcatenatedModule.codeGeneration (/Users/xx/Desktop/xx/chat/node_modules/webpack/lib/optimize/ConcatenatedModule.js:1435:7)
at /Users/xx/Desktop/xx/chat/node_modules/webpack/lib/Compilation.js:2727:22
at /Users/xx/Desktop/xx/chat/node_modules/webpack/lib/Cache.js:93:5
at Hook.eval [as callAsync] (eval at create (/Users/xx/Desktop/xx/chat/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)
at Cache.get (/Users/xx/Desktop/xx/chat/node_modules/webpack/lib/Cache.js:75:18)
at ItemCacheFacade.get (/Users/xx/Desktop/xx/chat/node_modules/webpack/lib/CacheFacade.js:117:15)
at Compilation._codeGenerationModule (/Users/xx/Desktop/xx/chat/node_modules/webpack/lib/Compilation.js:2720:9)
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported webpack 5 build involving react-virtualized and the error from webpack/lib/optimize/ConcatenatedModule.js. Trace how the generated Flow prop-type export is handled, and consider the issue complete when the same build succeeds under webpack 5 without the reported export-name error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.