本文主要讲述require.js在IDEA中路径智能感知的办法和探索中遇到的问题。

 测试使用的目录结构:一种典型的thinkphp 6的目录结构,如下图。

Require.js中的路径在IDEA中的最佳实践

 现在我通过在 vue-a.js 中运用不同的方式引用 ../td/data.js 文件。其中,data.js 的内容如下:

define([],
    function () {
        let idx = 0;

        console.log('data.js')

        return 'data' + (++idx);
    });
data.js的内容

相关文章:

  • 2021-11-28
  • 2021-09-21
  • 2021-10-07
  • 2021-12-26
  • 2022-12-23
  • 2021-05-20
  • 2021-08-04
猜你喜欢
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2021-05-23
  • 2021-06-02
  • 2022-12-23
相关资源
相似解决方案