In the vue2 version, I usually use require. Context to get all the files of a file
require.context('./modules', true, /\.js$/)
Errors will be reported when using vue3 vite
go to the vite official document and find the official provision method as follows
import.meta.globEager("./module/*.js")
Read More:
- The problem that the El icons icon cannot be displayed in vue3 + element plus + vite
- Scala Flink Watermarker Error: Static Methods in interface require -target:jvm-1.8
- An error is reported in the compiler require of laravel: installation failed, reversing/ composer.json to its original content.
- Docker encountered a problem 4: yaml: Line 1: mapping values are not allowed in this context
- ‘break’ not in the ‘loop’ or ‘switch’ context Error (Fixed)
- The spring boot set appears in the stand-alone version of redis Servlet.service () for servlet [dispatcherServlet] in context with path [] thr
- Idea running Flink program reported an error: static methods in interface require- target:jvm-1.8
- Solution in idea java.lang.ClassNotFoundException : org.springframework.web . context.ContextLoaderListener
- [Solved] KEIL MDK Warning: “no browse info for symbol in this context”
- go :Multiple-value strconv.Atoi() (int, error) in single-value context
- spring boot-beans in application context form a cycle
- Problems and solutions of error reporting in using swiper in Vue
- Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request p
- Solve the error of clearing data in object.assign in Vue
- Register global time filter in main.js in Vue
- Vue router click the menu bar and the same module reports an error Vue router.esm.js? 2215:2065 Uncaught (in promise) Error
- An error was reported when springboot connected to redis Servlet.service () for servlet [dispatcherServlet] in context with path [] threw e
- R language error error: n() should only be called in a data context
- JS error: require is not defined
- Cannot find name ‘require’