-
Notifications
You must be signed in to change notification settings - Fork 650
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
Conversation
lib/assets/javascripts/new-dashboard/router/routes/connected_apps.js
Outdated
Show resolved
Hide resolved
…artoDB/cartodb into lazyload-webpack-optimizations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
56459a8
to
11acc50
Compare
c4c428c
to
3a0c278
Compare
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", |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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"?
There was a problem hiding this comment.
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.
@@ -28,6 +29,8 @@ module.exports = { | |||
}, | |||
devtool: 'source-map', | |||
plugins: [ | |||
new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /en/), |
There was a problem hiding this comment.
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 Really nice job here. Thx for the effort on updates and improvements |
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