for the following code, after testing, you can observe:
- uses the
@ root/test/test.js
of the string, and the module can load on demand, loading the routing-related file only when the - uses the variable
@ root/$ {route} .js
, but the modules are packaged together, and the relevant packages are loaded before the route is triggered
test/test
route is triggered.
what is the cause of this problem? What should I do if I need to achieve on-demand loading? It feels cumbersome to write each route once.