[CONFIG] Using multi source throws `reduce is not a function`
See original GitHub issueIf an array is used in the entry
field of the webpack build configuration then reduce is not a function
is thrown. Even if it’s a single file:
const EsmWebpackPlugin = require("esm-webpack-plugin");
module.exports = {
mode: "development",
entry: ["index.js"],
output: {
library: "LIB",
libraryTarget: "var"
},
//...
plugins: [
new EsmWebpackPlugin()
]
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
TypeError: reduce is not a function in JavaScript | bobbyhadz
The "reduce is not a function" error occurs when we call the `reduce()` method ... You can conditionally check if the value is...
Read more >TypeError: this.reduce is not a function [duplicate]
This is happening because you are using for..in on an array. You shouldn't be doing that. When you added Array.prototype.xintsum , you added ......
Read more >TypeError: Reduce of empty array with no initial value
The JavaScript exception "reduce of empty array with no initial value" occurs when a reduce function is used.
Read more >TypeError Handling in React.js for Map Function | Pluralsight
This error occurs because your data is not an array. The .map() function only works with arrays. First, you'll need to confirm your...
Read more >The 10 Most Common JavaScript Issues Developers Face
If you need help figuring out why your JavaScript isn't working, consult this list of the 10 most common JavaScript issues from a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks again… Just published a patch: https://www.npmjs.com/package/@purtuga/esm-webpack-plugin
Perfect, thank you so much for your quick response!