Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: SvelteKit Vite Plugin support #327

Closed
wants to merge 72 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
708a11c
feat: `ESM` and `SvelteKit Vite Plugin` support
userquin Jul 7, 2022
60ead2e
chore: don't find svelte kit plugin if not ssr
userquin Jul 7, 2022
aab277f
chore: remove duplicate replace plugin on sveltekit-pwa
userquin Jul 8, 2022
a1a4143
Merge branch 'main' into userquin/feat-esm-support
userquin Jul 13, 2022
2040830
chore: update SvelteKit stuff
userquin Jul 13, 2022
68ff38b
chore: add workbox default interop
userquin Jul 13, 2022
3df3fad
chore: wording on global var comment
userquin Jul 13, 2022
e82f149
chore: remove SvelteKit configuration from options module
userquin Jul 13, 2022
3af79a0
chore: fix lint
userquin Jul 13, 2022
be83dd6
chore: update SvelteKit to latest
userquin Jul 13, 2022
d8ecae1
chore: add pwa types to pwa-configuration
userquin Jul 13, 2022
b78e409
fix: add `navigateFallbackAllowlist` only in dev server
userquin Jul 13, 2022
9f10300
chore: use `process.env.SOURCE_MAP` on minify and sourcemap
userquin Jul 13, 2022
a18d97e
chore: update new globPatterns in SvelteKit example conf
userquin Jul 13, 2022
cb828cc
chore: add hints about the layout for asset names in SvelteKit
userquin Jul 13, 2022
83a754a
chore: configure `dontCacheBustURLsMatching` when SvelteKit present
userquin Jul 13, 2022
60be3c8
chore: rename `lookupSvelteKitPlugin` in context
userquin Jul 13, 2022
f809876
chore: move SvelteKit `dontCacheBustURLsMatching` configuration to `o…
userquin Jul 13, 2022
0c13061
chore: remove `navigateFallbackAllowlist` for sw in dev (sveltekit ex…
userquin Jul 13, 2022
b81afd9
chore: add some defaults for SvelteKit (need review)
userquin Jul 13, 2022
12a15a2
chore: add SvelteKitAdapterPlugin
userquin Jul 14, 2022
5671d1d
Merge branch 'main' into userquin/feat-esm-support
antfu Jul 15, 2022
85acc37
refactor: renames
antfu Jul 15, 2022
4b66ce0
chore: include more options for sveltekit
userquin Jul 15, 2022
6fba6e1
Merge remote-tracking branch 'origin/userquin/feat-esm-support' into …
userquin Jul 15, 2022
566f4d8
chore: include more options for sveltekit
userquin Jul 15, 2022
564ad3e
chore: including som more kit stuff
userquin Jul 15, 2022
01896ef
Merge branch 'main' into userquin/feat-esm-support
userquin Jul 16, 2022
9a097d6
chore: cleanup console log
userquin Jul 16, 2022
3493676
chore: add include manifest option for client and ssr build
userquin Jul 18, 2022
aa5c880
chore: add option to change the webmanifest name in the sw's precahe …
userquin Jul 18, 2022
00d6dd9
chore: fix svelte-kit pwa-configuration
userquin Jul 18, 2022
a1d707e
chore: move selfDestroying to the manifest in the svelte-kit pwa-conf…
userquin Jul 18, 2022
0fe7c9d
chore: add option to configure icons folder
userquin Jul 18, 2022
bd422ec
chore: remove unused entries
userquin Jul 18, 2022
f93bae3
chore: add robots.txt to svelte-kit example
userquin Jul 18, 2022
651f4b9
chore: update sequential plugin to only intercept `closeBundle`
userquin Jul 18, 2022
12ff3f4
fix: sequential plugin must ignore activate plugin on SSR build
userquin Jul 18, 2022
2ec37a5
chore: update comment on sequential plugin
userquin Jul 18, 2022
eab9977
chore: update Sveltekit example to Vite 3 (kit requires it)
userquin Jul 20, 2022
9b2a95c
chore: cleanup globPatterns
userquin Jul 20, 2022
bea06e2
chore: remove `buildGlobIgnores`, it was redundant
userquin Jul 20, 2022
b460b27
chore: disable `includeManifestIcons``and remove `iconsFolder`
userquin Jul 21, 2022
8698ad3
chore: document kit's config options module
userquin Jul 22, 2022
e8a9fa6
chore: wording
userquin Jul 22, 2022
3a912e9
chore: update svelte-routify to use Vite 3
userquin Jul 22, 2022
c80d7cd
chore: remove template from svelte example
userquin Jul 22, 2022
08c0b24
chore: remove template from sveltekit example
userquin Jul 22, 2022
6604dfd
chore: update SvelteKit docs entry
userquin Jul 22, 2022
0466201
chore: add missing )
userquin Jul 22, 2022
a8a9233
chore: update sveltekit docs
userquin Jul 22, 2022
55962b9
chore: remove kit maintainers mention
userquin Jul 22, 2022
150d0ec
chore: indentation in example
userquin Jul 22, 2022
f6cdce5
chore: remove manifestFileName from pwa configuration
userquin Jul 22, 2022
0b2a8fa
chore: cleanup duplicate comment
userquin Jul 23, 2022
09b0a28
cods: update backticks usage
userquin Jul 23, 2022
9495947
chore: update backticks usage
userquin Jul 23, 2022
4a8373d
chore: update backticks usage
userquin Jul 23, 2022
f6b3632
chore: remove ; from sveltekit docs entry (lint)
userquin Jul 23, 2022
d4a228f
chore: use `sveltekit.assets` in sveltekit example entry point
userquin Jul 23, 2022
d009112
chore: revert config options
userquin Jul 23, 2022
f5b01af
chore: remove backticks
userquin Jul 23, 2022
c02aafa
chore: rename/callapse kit option name
userquin Jul 23, 2022
ff4f3a4
chore: remove `SvelteKitAdapterPlugin` from integrations
userquin Jul 23, 2022
027bb81
chore: use assets from `$app/paths` in the kit example layout
userquin Jul 23, 2022
38bae00
chore: update plugin configuration entries
userquin Jul 23, 2022
1b0cfae
chore: remove `includeManifest` entry (removed option from types)
userquin Jul 23, 2022
63e63bd
chore: wording
userquin Jul 23, 2022
904f465
chore: add assets in sveltekit code snippets
userquin Jul 23, 2022
6f8060b
chore: add `ViteSvelteKitPWA` plugin, we need build plugin with `enfo…
userquin Jul 23, 2022
1c106f9
chore: remove ) in comment from `ViteSvelteKitPWA` function
userquin Jul 23, 2022
f7927c2
chore: don't traverse plugins twice in build plugin
userquin Jul 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions docs/examples/svelte.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,6 @@ The `Svelte` example project can be found on `examples/svelte-routify` package/d

The router used on this example project is [@roxi/routify](https://routify.dev/).

The `Svelte` example has been created using `create-vite` template with `pnpx`:

::: details pnpx create-vite
```shell
pnpx create-vite
+ create-vite 2.5.4
√ Project name: ... svelte-routify
√ Select a framework: » svelte
√ Select a variant: » svelte-ts

Scaffolding project in examples\svelte-routify...

Done. Now run:

cd svelte-routify
npm install
npm run dev
```
:::

To test `new content available`, you should rerun the corresponding script, and then refresh the page.

If you are running an example with `Periodic SW updates`, you will need to wait 1 minute:
Expand Down
39 changes: 0 additions & 39 deletions docs/examples/sveltekit.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,6 @@ title: SvelteKit | Examples

The `SvelteKit` example project can be found on `examples/sveltekit-pwa` package/directory and it is configured with `@sveltejs/adapter-static` adapter.

The `SvelteKit` example has been created using `svelte@next` template with `pnpm`:

::: details pnpm create svelte@next sveltekit-pwa
```shell
pnpm create svelte@next sveltekit-pwa
+ create-svelte 2.0.0-next.89

Progress: resolved 5, reused 5, downloaded 0, added 5, done

create-svelte version 2.0.0-next.89

Welcome to SvelteKit!

This is beta software; expect bugs and missing features.

Problems? Open an issue on https:/sveltejs/kit/issues if none exists already.

√ Which Svelte app template? » Skeleton project
√ Use TypeScript? ... No / Yes
√ Add ESLint for code linting? ... No / Yes
√ Add Prettier for code formatting? ... No / Yes

Your project is ready!
✔ Typescript
Inside Svelte components, use <script lang="ts">
✔ ESLint
https:/sveltejs/eslint-plugin-svelte3

Install community-maintained integrations:
https:/svelte-add/svelte-adders

Next steps:
1: cd sveltekit-pwa
2: npm install (or pnpm install, etc)
3: git init && git add -A && git commit -m "Initial commit" (optional)
4: npm run dev -- --open
```
:::

To test `new content available`, you should rerun the corresponding script, and then refresh the page.

If you are running an example with `Periodic SW updates`, you will need to wait 1 minute:
Expand Down
Loading