question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[CONFIG] Using multi source throws `reduce is not a function`

See original GitHub issue

If 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:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
purtugacommented, Nov 13, 2018

Thanks again… Just published a patch: https://www.npmjs.com/package/@purtuga/esm-webpack-plugin

0reactions
darioncocommented, Nov 13, 2018

Perfect, thank you so much for your quick response!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found