[Vuejs]-Why exports fail in webpack when using an index file

0👍

Webpack is what we use to bundle everything together. Even is this syntax export * from "./design.constant"; is super user-friendly sometimes it doesn’t work.
When it doesn’t, for the file which has the import issue, your would need to manually import and export the functions/objects.
The first export has to be the one that has the problematic entities. The other ones can remain the same.

example:

import { 
 localStorageItem
} from "./localStorage.constant";

export {
  localStorageItem
};

export * from "./design.constant";
export * from "./application.constant";
export * from "./store-constant";

Leave a comment