Answer the question
In order to leave comments, you need to log in
Handling paths to imported modules using webpack?
Hello.
Suppose we have a directory structure like this:
components
component1
Component1.vue
component2
Component2.vue
component3
Component3.vue
index.js
app.js
export { default as Component1 } from './component1/Component1.vue';
export { default as Component2 } from './component2/Component2.vue';
export { default as Component3 } from './component3/Component3.vue';
// File ./components/component2/Component2.vue
import Component1 from '../component1/Component1.vue';
// File ./app.js
import { Component1, Component2 } from './components/index.js';
Answer the question
In order to leave comments, you need to log in
If the assembly has not increased, it means that there are no problems at the machine level. Although it is necessary to look at the performance in the dev tools in more detail. Webpack is pretty smart stuff. And the developers of webpack are also pretty bossy uncles. Not for nothing webpack uses Vue-cli.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question