Skip to content

Missing support babel-loader #8045

Description

@cuongqle

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [x] feature request

Versions.

Repro steps.

ES6 code with spread operator
For example:
case REQUEST_GUIDE_FULFILLED:
| return {
| ...filterGuideData(action.guide),
| isLoaded: true,
| }

Exception thrown:
Module parse failed: C:\workspace\showhowAdmin\platform\node_modules\source-map-loader\index.js!C:\workspace\showhowAdmin\platform\showhow-admin\app\player\redux\reducers\domain\guide.js Unexpected token (10:6)
You may need an appropriate loader to handle this file type.

The log given by the failure.

Desired functionality.

Module parse failed: C:\workspace\showhowAdmin\platform\node_modules\source-map-loader\index.js!C:\workspace\showhowAdmin\platform\showhow-admin\app\player\redux\reducers\domain\guide.js Unexpected token (10:6)
You may need an appropriate loader to handle this file type.
| case REQUEST_GUIDE_FULFILLED:
| return {
| ...filterGuideData(action.guide),
| isLoaded: true,
| }

Mention any other details that might be useful.

In @angular/cli/modles/webpack-configs/common.ts, if i have a small modify by adding babel-loader rule into 'module' section:
{ test: /.(js|ts)$/, loader: "babel-loader", exclude: [nodeModules] }
then it work fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions