Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtReact 7.0.0 CRA Webpack Integration Loaders Error #416

Open
kenanyildiz opened this issue Dec 13, 2019 · 0 comments
Open

ExtReact 7.0.0 CRA Webpack Integration Loaders Error #416

kenanyildiz opened this issue Dec 13, 2019 · 0 comments

Comments

@kenanyildiz
Copy link

kenanyildiz commented Dec 13, 2019

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))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant