seek-oss / sku

Front-end development toolkit

Home Page:https://seek-oss.github.io/sku

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RFC: Hot module reloading

torabian opened this issue · comments

As a developer, I want to be able to use hmr with zero configuration enabled by some flags.

Detailed design

We need to add some logic and wrapper for our webpack and App.jsx configuration to make it possible to work with hmr.

How We Teach This

Any existing sku project can use this benefits. Existing users must add the following code to their package.json:

"scripts": {
   "hmr": "sku hmr"
}

Drawbacks

There is no drawback since it's only a development tool and doesn't affect any code at production level.

Alternatives

As usual, we can use sku start which reloads the entire app for any changes.

Unresolved questions

Optional, but suggested for first drafts. What parts of the design are still
TBD?

Thanks for the RFC.

The big question for me is, why is sku hmr is a separate command? Shouldn't this behaviour be part of the regular development server provided with sku start?

Sorry, but on further reflection I'm closing this RFC as it's relatively vague, particularly the "detailed design" section which is missing the level of detail required to implement this. Happy to help if you need a hand with this, just reach out in the Slack channel.