We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
今天初始化想项目的时候需要添加动态路由,本以为是一个简单需求,结果进了一个大坑!
原因应该是在webpack,webpack 编译es6 动态引入 import() 时不能传入变量,因为webpack的现在的实现方式不能实现完全动态。
需要在变量前边加一个字符串 @/views ;注意@后边一定要跟一级目录
如果还是不行的话改成resolve引入
The text was updated successfully, but these errors were encountered:
No branches or pull requests
今天初始化想项目的时候需要添加动态路由,本以为是一个简单需求,结果进了一个大坑!
import 组件的时候直接写静态地址是可以,换成变量就不可以:
原因应该是在webpack,webpack 编译es6 动态引入 import() 时不能传入变量,因为webpack的现在的实现方式不能实现完全动态。
需要在变量前边加一个字符串 @/views ;注意@后边一定要跟一级目录
如果还是不行的话改成resolve引入
The text was updated successfully, but these errors were encountered: