Skip to content

fix global meta option not working when transpiled - #80

Open
min9105 wants to merge 1 commit into
stealjs:masterfrom
min9105:master
Open

fix global meta option not working when transpiled#80
min9105 wants to merge 1 commit into
stealjs:masterfrom
min9105:master

Conversation

@min9105

@min9105 min9105 commented May 23, 2017

Copy link
Copy Markdown

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

@matthewp matthewp left a comment

Copy link
Copy Markdown
Member

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!

Comment thread lib/global_amd.js
" 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
Copy Markdown
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