facebook / facebook/hermes

babel-plugin-syntax-hermes-parser drops chunk names

Open
#1,320 2 comments 5 reactions 1 assignee Claimed by @pieterv View on GitHub
bug
Dominant language
JavaScript
Stars
11.3k
Forks
865
Avg merge
1h 30m
Merged PRs (30d)
3

Description

## Bug Description

In our babel config, we define:

```js
...
plugins: [
'babel-plugin-syntax-hermes-parser',
...
]
...
```

We also have this in our webpack build:

```js
...
splitChunks: {
cacheGroups: {
shared: {
name: (module, chunks, cacheGroupKey) => {
return `${cacheGroupKey}~${chunks
.map((chunk) => chunk.name)
.join('~')}`.slice(0, 109);
},
...
},
...
},
...
}
```

If I add a log on the names generated, BEFORE: `shared~chunkname~otherchunkname` AFTER: `shared~~`.

The only change I'm making to our codebase is to add the plugin to the babel.config.js

The parser should not drop chunk names

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.