W
W
WalkinDed2020-05-06 18:12:01
JavaScript
WalkinDed, 2020-05-06 18:12:01

How to fix package re-registration error?

Good day! In the console, when hosting the project's production build server, the following error occurs: Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "input-mask" has already been used with this registry.
The site has 2 projects connected from 2 different repos.
1st is a component library (different buttons, widgets, mini applications, assembly is carried out using vue-cli-3)
2nd is separate pages that are written in vuejs, assembly is also carried out through vue-cli-3, and in this repo imports some vue components from the 1st repo.
Such an error occurs only on those pages where build js files from 2 repos are connected at the same time. Who faced such a problem, can you help?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arseny, 2020-05-07
@WalkinDed

Since you are building through Vue, then through Vue and collect builds for all conflicting pages to eliminate duplication.
And if this is unrealistic with the current build logic, then you can try to redefine the package name when it is imported in the Vuya assembly. To tell the truth, I never tried this option, since all such conflicts were resolved by the first approach.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question