You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I know we build with swa build and it will create a build folder by default. In this build folder you can find a compiled staticwebapp.config.json which is good. However, if I use a swa-cli.config.json as specified below, then I get a bunch of errors about mime types not resolving and entire files being missing.
Loading module from “http://localhost:4280/_app/immutable/entry/start.4ODMfwI4.js” was blocked because of a disallowed MIME type (“”).
[localhost:4280](http://localhost:4280/)
Uncaught (in promise) TypeError: error loading dynamically imported module: http://localhost:4280/_app/immutable/entry/start.4ODMfwI4.js
Loading module from “http://localhost:4280/_app/immutable/chunks/entry.CYPFuQ1Y.js” was blocked because of a disallowed MIME type (“”).
[localhost:4280](http://localhost:4280/)
Loading module from “http://localhost:4280/_app/immutable/entry/app.LS5hQUrt.js” was blocked because of a disallowed MIME type (“”).
[localhost:4280](http://localhost:4280/)
Loading module from “http://localhost:4280/_app/immutable/chunks/scheduler.CwHJs5Ia.js” was blocked because of a disallowed MIME type (“”).
[localhost:4280](http://localhost:4280/)
Loading module from “http://localhost:4280/_app/immutable/chunks/index.Dj9DObCy.js” was blocked because of a disallowed MIME type (“”).
[localhost:4280](http://localhost:4280/)
Loading module from “http://localhost:4280/_app/immutable/chunks/preload-helper.D6kgxu3v.js” was blocked because of a disallowed MIME type (“”).
[localhost:4280](http://localhost:4280/)
Loading module from “http://localhost:4280/_app/immutable/chunks/index.YNrA3HLd.js” was blocked because of a disallowed MIME type (“”).
[localhost:4280](http://localhost:4280/)
Loading module from “http://localhost:4280/_app/immutable/nodes/0.CEPFXPZT.js” was blocked because of a disallowed MIME type (“”).
[localhost:4280](http://localhost:4280/)
Loading module from “http://localhost:4280/_app/immutable/chunks/Button.DLTS_h23.js” was blocked because of a disallowed MIME type (“”).
[localhost:4280](http://localhost:4280/)
Loading module from “http://localhost:4280/_app/immutable/chunks/bundle-mjs.BJdXCQDb.js” was blocked because of a disallowed MIME type (“”).
I run local development with swa build && swa start. Is this the correct way to support SWA CLI? I'm trying to resolve an issue where if I don't specify the swaConfigLocation then I have to maintain a staticwebapp.config.json in the root of my repo just for local development. This leads to duplicate config entries between staticwebapp.config.json and svelte.config.js and if I commit this to my repo then the entire app stops serving in Azure. Trying to determine what the proper setup looks like for development purposes between this and SWA CLI.
This is just one of the issues I'm encountering unfortunately. For some reason my form POST actions are returning a 405 Method Not Allowed when I run via the SWA CLI and I'm not sure why that's happening but it led me to try and fix my local development configuration. The same form submission I do against http://localhost:5173 will succeed, but proxied through swa cli, it won't and result in 405 method not allowed :/
The text was updated successfully, but these errors were encountered:
Then the form submission works great but you lose HMR after the initial POST as you're left with the errors described above where _app assets don't resolve correctly. Is there another change needed in the proxy vite plugin to support routing to _app while keeping hot reloading working?
So I know we build with
swa build
and it will create abuild
folder by default. In thisbuild
folder you can find a compiledstaticwebapp.config.json
which is good. However, if I use aswa-cli.config.json
as specified below, then I get a bunch of errors about mime types not resolving and entire files being missing.swa-cli.config.json
I run local development with
swa build && swa start
. Is this the correct way to support SWA CLI? I'm trying to resolve an issue where if I don't specify theswaConfigLocation
then I have to maintain astaticwebapp.config.json
in the root of my repo just for local development. This leads to duplicate config entries betweenstaticwebapp.config.json
andsvelte.config.js
and if I commit this to my repo then the entire app stops serving in Azure. Trying to determine what the proper setup looks like for development purposes between this and SWA CLI.This is just one of the issues I'm encountering unfortunately. For some reason my form POST actions are returning a 405 Method Not Allowed when I run via the SWA CLI and I'm not sure why that's happening but it led me to try and fix my local development configuration. The same form submission I do against http://localhost:5173 will succeed, but proxied through swa cli, it won't and result in 405 method not allowed :/
The text was updated successfully, but these errors were encountered: