mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-24 18:13:42 +01:00
Name the Webpack chunks (#3291)
This commit is contained in:
parent
3572138b16
commit
135bdd149e
2 changed files with 4 additions and 4 deletions
|
@ -49,7 +49,7 @@ class EmojiPickerDropdown extends React.PureComponent {
|
|||
this.setState({active: true});
|
||||
if (!EmojiPicker) {
|
||||
this.setState({loading: true});
|
||||
import('emojione-picker').then(TheEmojiPicker => {
|
||||
import(/* webpackChunkName: "emojione_picker" */ 'emojione-picker').then(TheEmojiPicker => {
|
||||
EmojiPicker = TheEmojiPicker.default;
|
||||
this.setState({loading: false});
|
||||
}).catch(err => {
|
||||
|
|
|
@ -18,13 +18,13 @@ const needsExtraPolyfills = !(
|
|||
// This avoids shipping them all the polyfills.
|
||||
if (needsBasePolyfills) {
|
||||
Promise.all([
|
||||
import('../mastodon/base_polyfills'),
|
||||
import('../mastodon/extra_polyfills'),
|
||||
import(/* webpackChunkName: "base_polyfills" */ '../mastodon/base_polyfills'),
|
||||
import(/* webpackChunkName: "extra_polyfills" */ '../mastodon/extra_polyfills'),
|
||||
]).then(main).catch(e => {
|
||||
console.error(e); // eslint-disable-line no-console
|
||||
});
|
||||
} else if (needsExtraPolyfills) {
|
||||
import('../mastodon/extra_polyfills').then(main).catch(e => {
|
||||
import(/* webpackChunkName: "extra_polyfills" */ '../mastodon/extra_polyfills').then(main).catch(e => {
|
||||
console.error(e); // eslint-disable-line no-console
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue