react-phoenix
react-phoenix copied to clipboard
Very large app.js
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
}