Conversation
Signed-off-by: Christopher Ng <[email protected]>
| import OC from './index.js' | ||
| import OCA from '../OCA/index.js' | ||
| import { isA11yActivation } from '../Util/a11y.js' | ||
| import { isA11yActivation } from '@nextcloud/vue' |
There was a problem hiding this comment.
This will increase the dist bundle size by about 5MB.
Webpack is not good at tree shaking, so the best would be to use import ... from '@nextcloud/vue/dist/.../' but the a11y is currently not exported like this.
BTW: The other option to use the named import schema in every core file, is even worse...
| Before this | With this | Everything as named import |
|---|---|---|
| 57872356 | 62524760 | 73743763 |
(bytes)
There was a problem hiding this comment.
5MB seems to be a lot
There was a problem hiding this comment.
Yeah this already known (one of the reasons I am pushing ESM + vite).
But for now we need to add an entry point for this to the @nextcloud/vue library and stick with the explicit default import.
JuliaKirschenheuter
left a comment
There was a problem hiding this comment.
I'm voting for usage of import ... from '@nextcloud/vue/dist/.../' too
Summary
Use util from
@nextcloud/vueand drop core utilChecklist