judo-heroes-2 icon indicating copy to clipboard operation
judo-heroes-2 copied to clipboard

How we can setup code-splitting with this project

Open manishaggarwal94 opened this issue 6 years ago • 1 comments

Hi Mammino,

We are using your repository for one of our project and we setup all the things easily with that. But we are not getting that how we can setup code-splitting or PRPL with your project.

We are trying following thing at routes but not able to load.

`<Layout> <Switch>

  <Route path="/" 
    getComponent={(location, callback) => {
      require.ensure([], require => {
        callback(null, require('./IndexPage').default)
      }, 'IndexPage')
    }} />
`

So can you please help us on that.

Thanks, Manish

manishaggarwal94 avatar Jul 07 '17 15:07 manishaggarwal94

Hi @manishaggarwal94,

To be honest I haven't experimented with this webpack feature yet. Any example / PR / suggestion is accepted.

lmammino avatar Jul 22 '17 08:07 lmammino