-
Notifications
You must be signed in to change notification settings - Fork 167
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/postui/alephjs-hello-world/obldp1oi8 |
|
in fact all the preload-able scripts will pre-import in main.js(please check it in chrome) and main.js is preloaded, i am wondering maybe no preload scripts needed (should test it) |
and the preload script should be |
@ije I think you are still going to need to preload those others scripts. Check this snip from the Google Lighthouse: |
i see, thanks, do you have a spare time to check the |
add preload scripts with createHtml({
...
scripts: [
{ src: '...', type: 'module', preload: true },
...
],
...
}) |
I will take a look at it. |
cool! |
@ije I moved the changes to |
@shadowtime2000 great!! i would create a function like: function getPreloadScripts(baseUrl: string) {
const scripts = [
'-/deno.land/x/aleph/aleph.js',
'-/deno.land/x/aleph/context.js',
'-/deno.land/x/aleph/error.js',
'-/deno.land/x/aleph/events.js',
'-/deno.land/x/aleph/routing.js,',
'-/deno.land/x/aleph/util.js'
]
return scripts.map(src => ({ src: `${baseUrl}${src}`, type: 'module', preload: true }))
} then inject it to all the createHtml({
...
scripts: [
...
...getPreloadScripts(baseUrl),
...
],
...
}) then i will marge this request, thanks |
@ije Done. |
LGTM; thanks |
Update hmr-with-fast-refresh.md
Should resolve #7.