A Svelte and Firebase starter project for building an SPA. Updated to Svelte 3!
Firebase is best used as a global package.
npm install -g firebase-tools
firebase login
It's recommended to use degit
.
npm install -g degit
degit RoryDuncan/svelte-firebase-spa-starter my-project
, thencd my-project
- If not using degit you can clone the repository
npm install
- Add your Firebase Config inside
/src/init/firebase.js
- Build and view it locally:
npm run build && npm run local
-
npm
scripts:build
- Build your svelte appwatch
- Watch your svelte applocal
- Runsfirebase serve --only hosting
deploy
- runsfirebase deploy
-
Project structure scaffolding
- folders structure
rollup.config.js
preconfiguredimport
relative to/src
buble
when you're ready for a production build
- Setup svelte initialization
- Setup firebase initialization (just needs your config from your firebase console)
- setup
.gitignore
for build files - Component:
Loading.html
-
page.js
for routing- Lightly included, in case an alternative is desired.