Access RequireJS path configuration

前端 未结 2 1999
予麋鹿
予麋鹿 2021-02-15 15:10

I notice in the documentation there is a way to pass custom configuration into a module:

requirejs.config({
    baseUrl: \'./js\',
    paths: {
        jquery: \         


        
2条回答
  •  日久生厌
    2021-02-15 15:43

    It is available, but it's an implementation detail that shouldn't be depended on in production code ( which you've already said it's not for, but fair warning to others! )

    The config for the main context is available at require.s.contexts._.config. Other configurations will also hang off of that contexts property with whatever name you associated with it.

提交回复
热议问题