From: Justin Hernandez Date: Sat, 11 Jul 2020 23:03:23 +0000 (-0500) Subject: Add fallback url to fuse devserver(closes #945) (#946) X-Git-Url: http://these/git/%22https:/nerdica.net/%7Biframely.url%7D?a=commitdiff_plain;h=1b9f2fa5f7f7831f59b24cb36a5607a769a0d92e;p=lemmy.git Add fallback url to fuse devserver(closes #945) (#946) --- diff --git a/ui/fuse.js b/ui/fuse.js index 00d28caf..48f7ecdb 100644 --- a/ui/fuse.js +++ b/ui/fuse.js @@ -6,12 +6,10 @@ const { WebIndexPlugin, QuantumPlugin, } = require('fuse-box'); -// const transformInferno = require('../../dist').default const transformInferno = require('ts-transform-inferno').default; const transformClasscat = require('ts-transform-classcat').default; let fuse, app; let isProduction = false; -// var setVersion = require('./set_version.js').setVersion; Sparky.task('config', _ => { fuse = new FuseBox({ @@ -45,18 +43,18 @@ Sparky.task('config', _ => { }); app = fuse.bundle('app').instructions('>index.tsx'); }); -// Sparky.task('version', _ => setVersion()); Sparky.task('clean', _ => Sparky.src('dist/').clean('dist/')); Sparky.task('env', _ => (isProduction = true)); Sparky.task('copy-assets', () => Sparky.src('assets/**/**.*').dest(isProduction ? 'dist/' : 'dist/static') ); Sparky.task('dev', ['clean', 'config', 'copy-assets'], _ => { - fuse.dev(); + fuse.dev({ + fallback: 'index.html', + }); app.hmr().watch(); return fuse.run(); }); Sparky.task('prod', ['clean', 'env', 'config', 'copy-assets'], _ => { - // fuse.dev({ reload: true }); // remove after demo return fuse.run(); });