Skip to content

Commit 4f3d0e8

Browse files
authored
Merge pull request #7197 from nextcloud-libraries/backport/7195/stable8
[stable8] fix(NcActionInput): lazy load large children
2 parents 52bb8ae + e44bd67 commit 4f3d0e8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/components/NcActionInput/NcActionInput.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,9 @@ For the `NcSelect` component, all events will be passed through. Please see the
248248
</template>
249249

250250
<script>
251-
import NcColorPicker from '../NcColorPicker/index.js'
252-
import NcDateTimePicker from '../NcDateTimePicker/index.js'
251+
import { defineAsyncComponent } from 'vue'
253252
import NcDateTimePickerNative from '../NcDateTimePickerNative/index.js'
254253
import NcPasswordField from '../NcPasswordField/index.js'
255-
import NcSelect from '../NcSelect/index.js'
256254
import NcTextField from '../NcTextField/index.js'
257255
import ActionGlobalMixin from '../../mixins/actionGlobal.js'
258256
import GenRandomId from '../../utils/GenRandomId.js'
@@ -263,12 +261,13 @@ export default {
263261
name: 'NcActionInput',
264262
265263
components: {
266-
NcColorPicker,
267-
NcDateTimePicker,
268264
NcDateTimePickerNative,
269265
NcPasswordField,
270-
NcSelect,
271266
NcTextField,
267+
// Lazy load components with more than 50kB bundle size impact
268+
NcColorPicker: defineAsyncComponent(() => import('../NcColorPicker/index.js')),
269+
NcDateTimePicker: defineAsyncComponent(() => import('../NcDateTimePicker/index.js')),
270+
NcSelect: defineAsyncComponent(() => import('../NcSelect/index.js')),
272271
},
273272
274273
mixins: [ActionGlobalMixin],

0 commit comments

Comments
 (0)