Skip to content

ExtReact 7.0.0 CRA Webpack Integration Loaders Error #416

@kenanyildiz

Description

@kenanyildiz

I create a project with create-react-app React v16.12.0 version latest now and eject the project for configuration to add extjs. CRA eject 2 config file, one is webpack.config.js one is webpack.devServer.config.js.

I also create a project with ext-gen and it gives only webpack.config.js. I read all of the Sencha Extjs documentation to integrate extjs to react app, but i could not.

I try to customize CRA webpack.config.js adding ExtReact plugins, loaders vs.

Is there a way to do this? or doc.

my error is:

./src/index.js 31:4 
Module parse failed: Unexpected token (31:4)                                     
You may need an appropriate loader to handle this file type, currently no loader s are configured to process this file. See https://webpack.js.org/concepts#loaders
import React from 'react'
import ReactDOM from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import { launch, ExtReact } from '@sencha/ext-react'
import App from './App'

let viewport

Ext.require([
  'Ext.layout.*',
])

const render = (Component, target) => {
  ReactDOM.render(
    <ExtReact> // CAN NOT LOAD
      <AppContainer>
        <Component/>
      </AppContainer>
    </ExtReact>,
    target
  )
}

launch(target => render(App, viewport = target));

if (module.hot) {
  module.hot.accept('./App', () => render(App, viewport))
}

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