Co-authored-by: Ben Word <ben@benword.com>
This commit is contained in:
Kelly Mears
2022-02-23 06:45:08 -08:00
committed by GitHub
parent fc93185a7a
commit f297df0942
8 changed files with 510 additions and 546 deletions

View File

@@ -1,15 +1,21 @@
import {domReady} from '@roots/sage/client';
/**
* Run the application when the DOM is ready.
* app.main
*/
domReady(() => {
// Application code.
});
const main = async (err) => {
if (err) {
// handle hmr errors
console.error(err);
}
// application code
};
/**
* Accept module updates
* Initialize
*
* @see https://webpack.js.org/api/hot-module-replacement
*/
import.meta.webpackHot?.accept(console.error);
domReady(main);
import.meta.webpackHot?.accept(main);