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

perf(bundles): Improve nextcloud-vue import to only load components once #36383

Closed
wants to merge 8 commits into from

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Jan 26, 2023

Summary

Since the node_module imports are shared in core-common.js anyways and server likely uses most of the vue components there is no real use case in importing them separately. This brings down the core-common.js size from 15 MB to 10 MB.

Checklist

@skjnldsv
Copy link
Member

skjnldsv commented Jan 26, 2023

/home/runner/work/server/server/node_modules/@nextcloud/vue/dist/index.module.js imported multiple times

@juliusknorr
Copy link
Member Author

A few more still to fix:

/home/runner/work/server/server/apps/comments/src/components/Comment.vue
24
Error:   107:99  error    RichEditorMixin not found in '@nextcloud/vue'             import/named

/home/runner/work/server/server/apps/dashboard/src/main.js
71
Error:   26:10  error  VTooltip not found in '@nextcloud/vue'  import/named

/home/runner/work/server/server/apps/dav/src/views/Availability.vue
84
Warning:   50:8   warning  Missing file extension "js" for "../service/CalendarService"    import/extensions
85
Warning:   54:8   warning  Missing file extension "js" for "../service/PreferenceService"  import/extensions
86
Error:   55:62  error    NcTimezonePicker not found in '@nextcloud/vue'                  import/named

/home/runner/work/server/server/apps/files/src/views/Settings.vue
124
Error:   73:76  error  NcInputField not found in '@nextcloud/vue'  import/named


/home/runner/work/server/server/apps/workflowengine/src/components/Checks/FileSystemTag.vue
694
Error:   30:10  error  MultiselectTags not found in '@nextcloud/vue'  import/named

/home/runner/work/server/server/core/src/components/UnifiedSearch/SearchResult.vue
833
Error:   62:10  error  NcHighlight not found in '@nextcloud/vue'  import/named

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>

chore: Bump @nextcloud/dialogs and nextcloud-vue-collections

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr
Copy link
Member Author

Closing for now as this might need proper tree-shakable library builds with vite instead of webpack at some point first. :/

@skjnldsv skjnldsv deleted the perf/bundle branch March 14, 2024 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants