reactjs如何导入项目根目录?

时间:2017-06-07 08:20:49

标签: reactjs

react-native:react-native how to import project root directory?

但是,我想做出反应。

App
 |-- application
      |-- config 
      |    |-- themes.js
      |    |-- redux.js
      +-- views
      |    |-- login
      |    |    |-- login.js  
      |-- index.js

的示例:

....
import themes from './config/themes';
import themes from './config/redux';
...

....
import themes from '../../config/themes';
import themes from '../../config/redux';
...

这是代码:

....
import themes from '@root/application/config/themes';
import themes from '@root/application/config/redux';
import ... from '@root/...';
...

0 个答案:

没有答案