Skip to content

[Rendering] react-native: You may need an appropriate loader to handle this file type #116

@arvidlb

Description

@arvidlb

Target Platforms

NodeJS

SDK Version

Latest

Application Name

Dev environment

Problem Description

ERROR in ./node_modules/adaptivecards-reactnative/src/adaptive-card.js 227:12
Module parse failed: Unexpected token (227:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| var adaptiveCardContent = (
<ContainerWrapper
| configManager={this.configManager}
| style={containerStyles}

Research implies this would have to do with .JS(X) loaders in webpack. However, mine is set as follows:

rules: [
      {
        test: /\.jsx?$/,
        exclude: /node_modules/,
        loader: 'babel-loader',
        options: {
          presets: ['@babel/preset-env', '@babel/preset-react'],
        },
      },
      {
        test: /\.js$/,
        exclude: /node_modules/,
        loader: 'babel-loader',
        options: {
          presets: ['@babel/preset-env', '@babel/preset-react'],
        },
      },

Screenshots

No response

Card JSON

N/A

Sample Code Language

No response

Sample Code

No response

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