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 plugins option #17

Merged
merged 2 commits into from
Dec 14, 2018
Merged

Conversation

3846masa
Copy link
Contributor

@3846masa 3846masa commented Dec 6, 2018

Implemented #16

[
  new WorkerPlugin({
    plugins: [new SomePluginInWorker()],
  }),
]
// Or
[
  new SomePluginInWorkerAndBrowser(),
  new WorkerPlugin({
    plugins: ['SomePluginInWorkerAndBrowser'],
  }),
]

Copy link
Collaborator

@developit developit left a comment

Choose a reason for hiding this comment

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

This is a wonderful solution! Thank you so much for putting in the work to get tests around it too 💖

* the License.
*/

const WORKER_PLUGIN_SYMBOL = Symbol('WORKER_PLUGIN_SYMBOL');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might be worth using Symbol.for() here.

@developit developit merged commit 4454968 into GoogleChromeLabs:master Dec 14, 2018
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