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

Lazy loading for routes and webpack optimizations #15581

Merged
merged 24 commits into from
Apr 22, 2020

Conversation

jesusbotella
Copy link
Contributor

@jesusbotella jesusbotella commented Mar 30, 2020

While configuring a new route for Direct DB connection page (not in this branch), I saw that there were so many routes within the same file. So, I split them into several files and leveraged the opportunity to add lazy loading to all of the page components.

Kinda related to #14606

@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
@CartoDB CartoDB deleted a comment from hound bot Mar 30, 2020
Copy link
Contributor

@VictorVelarde VictorVelarde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@jesusbotella jesusbotella force-pushed the lazyload-webpack-optimizations branch from 56459a8 to 11acc50 Compare April 2, 2020 12:55
@jesusbotella jesusbotella force-pushed the lazyload-webpack-optimizations branch from c4c428c to 3a0c278 Compare April 2, 2020 16:58
package.json Outdated
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-stage-2": "^6.24.1",
"@babel/plugin-syntax-jsx": "^7.8.3",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Nice boy scout!

}
]
],
"sourceType": "unambiguous",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular problem found before this sourceType setting or it is just "recommended"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to set it to unambiguous because we mix different module formats.

https://babeljs.io/docs/en/options#sourcetype

@@ -28,6 +29,8 @@ module.exports = {
},
devtool: 'source-map',
plugins: [
new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /en/),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition, I guess we're saving some bytes there...

@jesusbotella jesusbotella merged commit a2d91cc into master Apr 22, 2020
@VictorVelarde
Copy link
Contributor

@jesusbotella Really nice job here. Thx for the effort on updates and improvements

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

Successfully merging this pull request may close these issues.

2 participants