jaredhanson / jaredhanson/electrolyte

Node_module factory functions not instantiated

Open
#18 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
555
Forks
60
PR merge metrics
No merged PRs in 30d

Description

I am experiencing an issue where my factory components that are also node modules are not instantiated but the functions are marked as literals.

The statement `module['@literal'] = true;` in loaders/node_modules (line 6) is causing this. Changing it to `if (module['@literal'] === undefined) module['@literal'] = true;` should solve the problem.

Another option is to remove the above mentioned line entirely and use the container's `_registerModule` function. The default pattern for anything that is not a function is already literal there.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in loaders/node_modules at line 6 and inspect how the module is marked literal. Compare that behavior with the container's _registerModule function; done means factory components that are also Node modules are instantiated rather than treated as literals.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.