Nothing fancy here -- just the absolutely bare minimum setup.
I did not find any deployment guidance on the web specifically for IIS. I know just enough about IIS to get this working, so feel free to suggest a better way. Here is what I had to do to get the app working.
- modify the public/index.html file (came from the Svelte template) to remove the leading / from the public/index.html for style sheets and bundle, so href='/global.css' became href='global.css'
- do this for the favicon as well
- build the build command: npm run build
- copy the public directory to some target application directory on the target server
- add an "app" to the default site in IIS on the target server, give it a name, let's say it's "blackbird," and when it asks for the directory path, set it to "public" in the application directory
- the app url then is: http://target_server_name/blackbird
The main takeaway was to fix the paths in index.html. I could see in the console the errors that the app was not finding these files and clearly the app was not starting up.
This does NOT seem to break anything during development when I run "npm run dev"
Top comments (0)