Answer the question
In order to leave comments, you need to log in
VueLoaderPlugin and run function in file handling rules?
Good afternoon. I ran into a problem when creating a assembler bundle for my projects. I need to get information about the file that is transferred to the loader, for this I write a rule:
{
test: XXXX, // разрешение файла
(data) => {
// какой-то код
}
}
Answer the question
In order to leave comments, you need to log in
I started to analyze the loader sources - it turned out that it clones and rewrites all the rules, and in the process all declared functions were thrown out. But there was one exception, if the enforce property was set, then this rule was not processed. Regardless of the enforce value set, the functions began to work as intended.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question