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

PathMapper中对amdConfig的对象的eval带来的副作用 #129

Open
teazean opened this issue Aug 11, 2017 · 0 comments
Open

PathMapper中对amdConfig的对象的eval带来的副作用 #129

teazean opened this issue Aug 11, 2017 · 0 comments

Comments

@teazean
Copy link

teazean commented Aug 11, 2017

比如下面的require.config

require.config({
    'baseUrl': '../src',
    'paths': {},
    'packages': [
        {
            'name': 'aa',
            'location': '../dep/aa/src',
            'main': 'main'
        }
    ],
    'urlArgs': {
        'aa': 't=' + Math.floor(Date.now() / 1000 / 60 / 60 / 24)
    }
});

会被编译成

require.config({
    'baseUrl': '../src',
    'paths': {},
    'packages': [
        {
            'name': 'aa',
            'location': '../dep/aa/src',
            'main': 'main'
        }
    ],
    'urlArgs': {
        'aa': 't=17389'
    }
});

是不是可以直接拿替换后的path值,进行字符串替换之前的path值,而不是整个config对象替换。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant