Skip to content
New issue

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

[FAQ] roadmap.path的配置为何工作不正常 #76

Open
hefangshi opened this issue Jun 9, 2014 · 0 comments
Open

[FAQ] roadmap.path的配置为何工作不正常 #76

hefangshi opened this issue Jun 9, 2014 · 0 comments
Labels

Comments

@hefangshi
Copy link
Member

roadmap.path是FIS配置中最复杂也是比较容易出现问题的配置

如果通过fis.config.set('roadmap.path', [...])的形式设置roadmap.path,则之前的roadmap.path设置会被最新的设置覆盖。

如果通过fis.config.get('roadmap.path').unshift({ reg: .....})进行配置,则可以添加新的配置项。

一般来说,如果roadmap.path的工作不正常,大概有以下几个原因

  1. 确认是否错误的对roadmap.path进行了多次设置导致原有的配置被覆盖了。
  2. 检查reg的正则或glob写法语法是否正确。
  3. 检查roadmap.path的匹配内容,希望匹配的文件是否已经被优先级更高的匹配语句匹配了。

Tips:

你可以在fis-conf.js中输出roadmap.path来确认当前项目在编译时实际运行的配置

console.log(JSON.stringify(fis.config.get('roadmap.path'), null, 4));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant