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

Add support for es6 imports #29

Closed
ConnerAiken opened this issue Aug 20, 2019 · 1 comment
Closed

Add support for es6 imports #29

ConnerAiken opened this issue Aug 20, 2019 · 1 comment

Comments

@ConnerAiken
Copy link
Contributor

It would be nice to support CommonJS/ES6 imports for the ObservableSlim and Nimbly libraries for transpiling/minification/bundling purposes.

Boilerplate repo: https://github.com/ConnerAiken/nimbly-boilerplate

The master branch is a working boilerplate.
The es6-import branch is an example of how I would expect the library to be imported using es6 modules.
The es5-import branch is an attempt at using CommonJS (require) for the libraries, but I get the error: MutationObserver is not a constructor

@ElliotNB
Copy link
Owner

ElliotNB commented Oct 3, 2019

Looked into this with Conner today -- does support ES6 imports but the dependency injection wrapper is required. Closing for now, but we probably should modify the Nimbly examples to show a working import.

@ElliotNB ElliotNB closed this as completed Oct 3, 2019
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

2 participants