Skip to content

Facing issue with reducer.js and it is necessary to add webpack as one of the solution suggest to use webpack #67

@1410Arpita

Description

@1410Arpita

Failed to compile
./src/reducer.js 10:16
Module parse failed: Unexpected token (10:16)
You may need an appropriate loader to handle this file type.
| // Selector
| export var getBasketTotal = function getBasketTotal(basket) {

return basket?.reduce(function (amount, item) {
| return item.price + amount;
| }, 0);
This error occurred during the build time and cannot be dismissed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions