diff --git a/src/native/bindings.cc b/src/native/bindings.cc index 44a640a6..0e316f85 100644 --- a/src/native/bindings.cc +++ b/src/native/bindings.cc @@ -488,4 +488,8 @@ NAN_MODULE_INIT(Init) { Nan::Export(target, "setError", WebGLRenderingContext::SetError); } +#if NODE_MAJOR_VERSION >= 10 +NAN_MODULE_WORKER_ENABLED(webgl, Init) +#else NODE_MODULE(webgl, Init) +#endif