@idio/hot-reload

Dummy Code For Hot-Reload Compilation.

Usage no npm install needed!

<script type="module">
  import idioHotReload from 'https://cdn.skypack.dev/@idio/hot-reload';
</script>

README

@idio/hot-reload

npm version

@idio/hot-reload is Dummy Code For Hot-Reload Compilation.

yarn add @idio/hot-reload

Table Of Contents

API

The package is available by importing its default function:

import hotReload from '@idio/hot-reload'

hotReload(
  callback: function(),
): void

The re-rendering function to execute after an update to any of the files is made.

  • callback* function(): The callback.
/*
 * This file should only be used for compilation with Depack. The
 * `@idio/frontend` middleware is supposed to override `@idio/hot-reload`
 * import into `/hot-reload` path automatically, without the need for
 * the code from this package.
 */

/**
 * Registers hot-reload callback to rerender apps.
 * @param {!Function} cb
 */
export default function addHotReload(cb) {}

This package is meant to be installed when building bundles that use hot-reload from @idio/front-end middleware. The middleware will serve its proper version of source code needed for hot-reload, but @idio/hot-reload is needed when it comes to compiling apps.

Copyright & License

GNU Affero General Public License v3.0

idiocc © Idio 2020