Requirejs: paths vs map

后端 未结 3 2022
自闭症患者
自闭症患者 2020-12-17 08:29

Trying to understand where it\'s right to use \"map\" with a wildcard vs \"paths\".

Looking at the require source (but certainly not being 100% fluent with it) it s

3条回答
  •  孤街浪徒
    2020-12-17 08:47

    There is also one other important difference with the map config. You define a prefix that will be used in mappings.

    For your example this would mean that foo will be mapped to stuff/foo but also foo/bar/baz/bam will be mapped to stuff/foo/bar/baz/bam.

提交回复
热议问题