react-phoenix icon indicating copy to clipboard operation
react-phoenix copied to clipboard

Very large app.js

Open kristofvanwoensel opened this issue 4 years ago • 0 comments

Is there a way to split loads with this library? My app.js is getting very large because I'm loading all components in app.js.

Suppose I load map.js in the correct html.eex file:

webpack.config.js

  entry: {
      app: ['./js/app.js'].concat(glob.sync('./vendor/**/*.js')),
      map: ['./js/Components/idiofaMapShow.js'].concat(glob.sync('./vendor/**/*.js')),
  },

map.js

class MyMap extens React.Component{...}

document.Components
{
  MyMap
}

kristofvanwoensel avatar Sep 27 '21 14:09 kristofvanwoensel