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

Clean up globals option #960

Closed
guybedford opened this issue Dec 9, 2015 · 8 comments
Closed

Clean up globals option #960

guybedford opened this issue Dec 9, 2015 · 8 comments

Comments

@guybedford
Copy link
Member

We could provide a globals meta option to remove the globals created by a script after execution.

Perhaps something like:

System.config({
  meta: {
    'some-global.js': {
      encapsulateGlobals: true
    }
  }
});
@sberney
Copy link

sberney commented Dec 11, 2015

This would be great!

@nillis
Copy link

nillis commented Dec 22, 2015

+1

@capricube
Copy link

+1

@MicahZoltu
Copy link

👍 Would be great.

@Bnaya
Copy link

Bnaya commented Jan 3, 2016

For now, you can achieve similar effect by making a wrapper module.

make myJquery that requires npm:jquery/2.0/whatevenr.js, calling jQuery.noConflict() and returning jQuery.

point map: {jquery: } to your jquery wrapper module.

Can work the same for underscore

@frankandrobot
Copy link

Any roadmap for this feature?

@guybedford
Copy link
Member Author

This has been implemented experimentally in 3a1372d, but is only for format: 'global' modules.

@guybedford
Copy link
Member Author

Released in 0.19.28.

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

7 participants