7
7
7nbsp2021-01-06 22:31:10
webpack
7nbsp, 2021-01-06 22:31:10

How to set chunk / cacheGroup for a specific entrypoint?

How to set chunk / cacheGroup for a specific entrypoint?

For example, there are entrypoints that will import:

outer - [vue.js, some-outer-templates.vue]
inner - [vue.js, flatpickr, some-inner-templates.vue]
pupil - [vue.js, flatpickr, some-pupil-templates.vue]
teacher - [vue.js, flatpickr, some-teacher-templates.vue]


Is it possible to somehow set a set of chunks in entrypoints?
For example:

outer - ['outer-chunk']
inner - ['outer-chunk', 'inner-chunk']
pupil - ['outer-chunk', 'inner-chunk']
teacher - ['outer-chunk', 'inner-chunk']


those. make two chunks that will look like this:
outer-chunk - [vue.js]
inner-chunk - [flatpickr]


env: vue-cli 4.5.0

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question