Skip to content
This repository has been archived by the owner on Jan 13, 2018. It is now read-only.

bem server: deal with require() caching of loaded modules #45

Closed
arikon opened this issue Mar 14, 2012 · 2 comments
Closed

bem server: deal with require() caching of loaded modules #45

arikon opened this issue Mar 14, 2012 · 2 comments

Comments

@arikon
Copy link
Contributor

arikon commented Mar 14, 2012

The problem is that require() caches loaded modules, so when we need to reload changes make.js or something we'll get a link to the obsolete cached copy of new and not a new version from disk.

There are some places in code that need to be fixed.

@arikon
Copy link
Contributor Author

arikon commented Mar 21, 2012

Use delete require.cache[modulePath];

@arikon
Copy link
Contributor Author

arikon commented Mar 21, 2012

We can make decorator in utils and use it like:

require = wrapRequire(require);

require('path/to/file.deps.js', true); // noCache = true

@ghost ghost assigned scf2k Mar 22, 2012
@scf2k scf2k closed this as completed in bf798b8 Mar 22, 2012
scf2k added a commit that referenced this issue Sep 7, 2012
added require wrapper with no-cache feature (closes #45)
@vithar vithar unassigned scf2k Oct 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants