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

fix global meta option not working when transpiled #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

min9105
Copy link

@min9105 min9105 commented May 23, 2017

fix bug when stealjs has global meta option with exports and eval setup, works fine when in dev mode but not working after transpiled

after this patch, the eval type of script works, and exports has correct result

…up, works fine when in dev mode bug not working after transpiled
Copy link
Member

@matthewp matthewp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to get the tests passing, not add this code when not needed.

Thanks!

(metadata.init ? " var init = " + metadata.init.toString() + ";\n" : "") +
" loader.global.define = undefined;\n" +
" loader.global.module = undefined;\n" +
" loader.global.exports = undefined;\n" +
" loader.__exec({'source': source, 'address': module.uri});\n" +
" loader.__exec({'source': source, 'address': module.uri, 'metadata': {'eval': '" + (metadata.eval || '') + "'} });\n" +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are failing because this changes the output. Would be better to only add this bit if metadata.eval is truthy.

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

Successfully merging this pull request may close these issues.

2 participants