]> cat aescling's git repositories - mastodon.git/commitdiff
Name the Webpack chunks (#3291)
authorNolan Lawson <nolan@nolanlawson.com>
Thu, 25 May 2017 01:30:29 +0000 (18:30 -0700)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 25 May 2017 01:30:29 +0000 (03:30 +0200)
app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js
app/javascript/packs/application.js

index e3c61b4fe188e66ebec7dc698a6b959e6d803efd..fc921dfb8016bd73534eaa54a3c0e5fb0843932a 100644 (file)
@@ -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 => {
index 01c28e76851152a620310311a15e60c3db8ab1a7..be40726c6eae4713526b4ed65709133504bfbdac 100644 (file)
@@ -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 {