hot module reload : yoyo webpack
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
Anyone have any ideas about adding hot module reload for yoyo template objects?
My current incomplete code:
// ./yoyo-hot-loader.js
module.exports = function(source) {
if ((source.indexOf('yo`') > -1 || source.indexOf("yo-yo") > -1) && source.indexOf("module.hot") === -1) {
source += "if(module.hot) {";
source += " module.hot.accept();";
source += "}";
return source;
}
return null;
}
I'm not to familiar with the webpack hot reload plugin. Currently, this does hot reload but does not remove the old code. Ideas?
Here is the API: https://webpack.github.io/docs/hot-module-replacement.html
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the incomplete yoyo-hot-loader.js code in the issue and read webpack's Hot Module Replacement API documentation. Determine how yoyo template objects should be replaced so old code is removed rather than only accepted. Done means hot reload updates the affected template objects without leaving the previous code active.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, webpack
- Domain
- frontend, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100