Bonjour,
j’essaye de construire mon application VUE3
la commande npm run build me sort ceci
vite v2.8.6 building for production…
✓ 74 modules transformed.
[rollup-plugin-dynamic-import-variables] Assigning to rvalue (1852:44)
file: /ORIGINAL-P1/LARAVEL-BREW/BrewersCompanion/vue/src/components/RecipeEditor.vue:1852:44
Je comprends que le problème est à la ligne 1852 du fichier RecipeEditor.vue
Est-ce bien cela? Mais que signifie le 44 derrière 1852
Voici ce qui s’y trouve et qui ne donne aucune erreur avec npm run dev et qui fonctionne
//triggered when the user clicks the arrow button in the list item in public hop list
function displayHopEditor(hop, mode,rank) {
//data is a value passed as the data prop of the ModalComponent
let val = {};
val.hop = hop;
val.mode = mode;
val.recipe_type = type;
val.rank=rank;
data.value = val;
showHopEditor.value = true;
}
Cette function est appelé sur reception d’un événement. La ligne 1852 est celle de la déclaration de fonction.
<div class="my-list overflow-auto">
<HopListItem
v-for="(rh, index) in recipe_model.hops"
:key="index"
:rank="index"
:user_specific="true"
usage="forRecipe"
:mass_unit="hop_mass_pref"
:quantity="(rh.quantity * hop_mass_factor).toFixed(2)"
:duration="rh.duration"
:temperature="rh.temperature"
:method="rh.method"
:id="rh.id"
:hop="rh"
:colorSel="1"
:arrowTitle="i18n.$t('Add to my recipe')"
@recipeEditor_showHopEditor="displayHopEditor"
@recipeEditor_showConfirmDeletion="displayConfirmDeletion"
></HopListItem>
L’émetteur (composant HopListItem) de l’événement passe 3 paramètres
function showRecipeHopEditor(hop, mode) {
emit("recipeEditor_showHopEditor", hop, mode,props.rank);
}
Tout cela fonctionne correctement en dev, alors pourquoi la commande npm run build donne-t-elle cette erreur ?