gajus / gajus/prepack-webpack-plugin
Conflict with UglifyJsPlugin
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
```
plugins: [
new PrepackPlugin(),
new webpack.optimize.UglifyJsPlugin({
sourceMap:true,
compress:true
})
]
```
Will fire an error:
```
ERROR in bundle.js from UglifyJs
TypeError: Cannot read property 'section' of null
```
But if I flip the order of applying plugins, everything is fine:
```
plugins: [
new webpack.optimize.UglifyJsPlugin({
sourceMap:true,
compress:true
}),
new PrepackPlugin()
]
```
And if I turn off `sourceMap`, everything is also fine.
```
plugins: [
new PrepackPlugin(),
new webpack.optimize.UglifyJsPlugin({
compress:true
})
]
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the webpack configuration shown in the issue and reproduce the error using PrepackPlugin before UglifyJsPlugin with sourceMap enabled. Compare the failing order with the working reversed order and source-map-disabled case; done means the reported combination no longer throws the UglifyJs “section” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100