Coder Social home page Coder Social logo

kwchang0831 / svelte-qwer Goto Github PK

View Code? Open in Web Editor NEW
440.0 8.0 48.0 14.44 MB

✒︎ Simply Awesome Blog Starter built with SvelteKit and Love ❤

Home Page: https://svelte-qwer.vercel.app

License: MIT License

JavaScript 26.01% TypeScript 16.82% HTML 0.31% Svelte 45.08% SCSS 10.48% CSS 0.74% Shell 0.56%
svelte blog-starter qwer sveltekit svelte-qwer blog jamstack markdown giscus

svelte-qwer's Introduction

English | 中文

QWER

Simply Awesome Blog Starter built with SvelteKit and

Language GitHub svelte-QWER QWER

QWER Vercel DEMO QWER Netlify DEMO

QWER Q&A QWER DOCS

PAGESPEED

🎉 Try QWER out

npx degit kwchang0831/svelte-QWER my-blog

https://raw.githubusercontent.com/kwchang0831/svelte-QWER/main/user/assets/mobile-preview.webp


https://raw.githubusercontent.com/kwchang0831/svelte-QWER/main/user/assets/mobile-preview.webp

⚡️ Usage

  1. Get npm v18.x

  2. Get pnpm.

    npm i -g pnpm
  3. Install all the dependencies.

    pnpm i
  4. Run local dev server.

    pnpm dev
  5. Create an article folder (For Windows users, make sure to use a terminal that supports Bash scripts, such as Git Bash).

    pnpm run createblog YOURDIRNAME
    

✨ Features

  • ⚡ Super fast site performance. Near Perfect PageSpeed score.

  • 🤗 SEO ready with meta, Open Graph, Schema, JSON-LD, microformats2.

  • 🔎 On-site Search.

  • 📱 Mobile-First / Responsive design.

  • ✍️ Write post with Markdown syntax.

  • 🧮 🧪 Write Math and Chemical formulas with TeX Syntax via Katex & mhchem.

  • 📁 Folder-based organization for creating posts.

  • 🏷️ Multi-Tags filtering.

  • 📄 Auto-Generate Table of Content for posts.

  • 📦 Out-of-the-box support for Atom feed, Sitemap, PWA, JSON Feed.

  • 🖼️ Automatic image optimization via vite-imagetools.

  • ⚙️ Support embedding Svelte components and Javascript with Markdown.

  • 💬 Supports Giscus - a comments system powerd by Github Discussions.

  • 💄 Utilizes UnoCSS - the instant on-demand atomic CSS engine.

  • 🌐 i18n via typesafe-i18n.

  • 🚀 Deploy the blog Free on Vercel, Netlify, or Cloudflare Pages.

📚 Learn More

Please read our Documentation.

👷 Current State

QWER is at its' very early stage. Kindly expect frequent breaking changes.

Just copy and paste your user folder to the latest release.

Watch out for the CHANGELOG to see if yor are required to migrate user/config or other places.

❓ Issues / Problems / Questions

Please take advantage of our Github's Q&A Discussion board.

😊 Are you using QWER?

Please consider adding svelte-qwer topic to your repository.

To see who else are using QWER, please check Github-Topics: svelte-qwer.

🎉 Support

📝 License

MIT

🙏 Credits

svelte-qwer's People

Contributors

ethanol48 avatar github-actions[bot] avatar kwchang0831 avatar louis70109 avatar nemu1113 avatar nich87 avatar sharu725 avatar sisyphusla avatar srgeneroso avatar toddliao469469 avatar vai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

svelte-qwer's Issues

How to change favicon?

As the title says, I tried to replace the favicon.[icon,png] in the project, but when I built it, the icon changed back to the original leek, and I was wondering how to customize it?

Wrong image size

Describe the bug

iPhone 10x not displaying images correctly

it is somehow cut off, that with a preview, that after opening

can you check?

Reproduction

Iphone X
v. 14.4
Browser: Chrome\Safari

Logs

There is not

System Info

There is not

Additional Information

  • Preview

photo_2023-04-14_22-06-50

  • After open

photo_2023-04-14_22-06-44

  • Android works fine
    photo_2023-04-14_22-24-01

Article search not working: flexsearch

Describe the bug

A console error has occurred at the time of the first access,
and the site search function is not working properly.

Reproduction

  1. Execute "pnpm i"
  2. Execute "pnpm husky"
  3. Execute "pnpm dev"
  4. Access the following URL from browser
    http://localhost:5173/

Logs

Uncaught (in promise) TypeError: flexsearch.Index is not a constructor
    at Object._init [as init] (index.ts:11:14)
    at search.ts?type=module&worker_file:25:5

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (12) x64 AMD Ryzen 5 1600 Six-Core Processor
    Memory: 8.57 GB / 15.92 GB
  Binaries:
    Node: 16.17.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.18.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.53)    
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @sveltejs/adapter-auto: ^1.0.0-next.80 => 1.0.0-next.80      
    @sveltejs/adapter-node: ^1.0.0-next.96 => 1.0.0-next.96      
    @sveltejs/adapter-static: ^1.0.0-next.44 => 1.0.0-next.44    
    @sveltejs/kit: ^1.0.0-next.509 => 1.0.0-next.509 
    svelte: ^3.50.1 => 3.50.1
    vite: ^3.1.4 => 3.1.4

Additional Information

Enabled the following settings, and url or content etc contain non-ascii character.

user\config\QWER.config.js

RoutingRules: {
    PostsYearMonthDate: true,
},

Link to content

Describe the bug

Redirection to the selected content does not always work

Reproduction

Сopy the link to some section and paste it in another browser or new tab

Logs

-

System Info

-

Additional Information

Hello.QWER._.QWER.-.Google.Chrome.2023-04-15.23-15-05.mp4

Assets src path error on local Windows environment

Describe the bug

Hi! This case is a question. Possibly it could be a bug.

I run QWER on localhost.

I can't get images and video correctly in Example Post.

It seems to interpret the source path of the image and video elements as the root disk directory of the development project.

Please lend me your help.

Thank you.

image

image

Reproduction

Follow steps from Getting Started with QWER in QWER DOCS:

  1. npx degit kwchang0831/svelte-QWER my-blog
  2. cd my-blog
  3. pnpm i
  4. pnpm husky (I skin it.)
  5. pnpm dev

Go to the default post: Example Post.

Logs

PowerShell 7.3.3
Loading personal and system profiles took 1423ms.
 Ding@vac  D:\Dev\playground\blog  npx degit kwchang0831/svelte-QWER my-blog
 Ding@vac  D:\Dev\playground\blog  npx degit kwchang0831/svelte-QWER my-blog
> cloned kwchang0831/svelte-QWER#HEAD to my-blog
! action wants to remove netlify.toml but it does not exist
! action wants to remove .github/workflows/* but it does not exist
> removed: vercel.json
 Ding@vac  D:\Dev\playground\blog  cd my-blog
 Ding@vac  D:\Dev\playground\blog\my-blog  pnpm i
Scope: all 2 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +849
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: D:\.pnpm-store\v3
  Virtual store is at:             node_modules/.pnpm
Progress: resolved 849, reused 848, downloaded 0, added 849, done

devDependencies:
+ @builder.io/partytown 0.7.5
+ @changesets/cli 2.26.0
+ @iconify-json/akar-icons 1.1.13
+ @iconify-json/bxs 1.1.6
+ @iconify-json/carbon 1.1.16
+ @iconify-json/fluent-emoji-flat 1.1.10
+ @iconify-json/ic 1.1.13
+ @iconify-json/line-md 1.1.23
+ @iconify-json/mdi 1.1.50
+ @iconify-json/tabler 1.1.66
+ @iconify-json/vscode-icons 1.1.22
+ @kwchang0831/qwer 0.5.1 <- QWER
+ @kwchang0831/svelte-qwer 0.8.0 <- ???
+ @sveltejs/adapter-netlify 2.0.6
+ @sveltejs/adapter-node 1.2.2
+ @sveltejs/adapter-static 2.0.1
+ @sveltejs/adapter-vercel 2.3.1
+ @sveltejs/kit 1.11.0
+ @types/flexsearch 0.7.3
+ @types/lz-string 1.3.34
+ @types/nprogress 0.2.0
+ @typescript-eslint/eslint-plugin 5.54.1
+ @typescript-eslint/parser 5.54.1
+ @unocss/core 0.50.4
+ @unocss/preset-icons 0.50.4
+ @unocss/preset-uno 0.50.4
+ @unocss/reset 0.50.4
+ @unocss/transformer-compile-class 0.50.4
+ @unocss/transformer-directives 0.50.4
+ @unocss/transformer-variant-group 0.50.4
+ cross-env 7.0.3
+ eslint 8.36.0
+ eslint-config-prettier 8.7.0
+ eslint-plugin-svelte3 4.0.0
+ flexsearch 0.7.31
+ gitmoji-cli 8.0.0
+ husky 8.0.3
+ imagetools-core 3.3.1
+ katex 0.16.4
+ lint-staged 13.2.0
+ lz-string 1.5.0
+ medium-zoom 1.0.8
+ npm-run-all 4.1.5
+ nprogress 0.2.0
+ prettier 2.8.4
+ prettier-plugin-svelte 2.9.0
+ rimraf 4.4.0
+ sass 1.59.2
+ svelte 3.56.0
+ svelte-check 3.1.2
+ svelte-preprocess 5.0.1
+ tippy.js 6.3.7
+ tslib 2.5.0
+ typesafe-i18n 5.24.2
+ typescript 4.9.5
+ unocss 0.50.4
+ unocss-preset-scrollbar 0.2.1
+ vite 4.1.4
+ vite-imagetools 4.0.18

Done in 2m 15.3s
 Ding@vac  D:\Dev\playground\blog\my-blog  pnpm dev

> @kwchang0831/[email protected] dev D:\Dev\playground\blog\my-blog
> npm-run-all -s build:QWER dev:watch


> @kwchang0831/[email protected] build:QWER D:\Dev\playground\blog\my-blog
> node --no-warnings QWER build

下午4:41:22 [QWER] [Generated] Meta File Updated src/generated/asset.d.ts
下午4:41:22 [QWER] [Generated] Meta File Updated src/generated/assets.json
下午4:41:22 [QWER] [Generated] Meta File Updated src/generated/assets.ts
下午4:41:22 [QWER] [Generated] Meta File Updated src/generated/tags.json
下午4:41:22 [QWER] [Generated] Meta File Updated src/generated/posts.json
下午4:41:22 [QWER] Assets File Copied src\generated\assets\404.webp
下午4:41:22 [QWER] MD File Processed D:\Dev\playground\blog\my-blog\src\routes\about\+page.svelte
下午4:41:22 [QWER] MD File Processed D:\Dev\playground\blog\my-blog\src\routes\example\+page.svelte
下午4:41:22 [QWER] MD File Processed D:\Dev\playground\blog\my-blog\src\routes\hello-QWER\+page.svelte
下午4:41:22 [QWER] Image File Copied src\generated\assets\example\cover.jpg
下午4:41:22 [QWER] Static File Copied D:\Dev\playground\blog\my-blog\static\example\example2.mp4
下午4:41:22 [QWER] Image File Copied src\generated\assets\hello-QWER\cover.jpg
下午4:41:22 [QWER] Public File Copied static\favicon.ico
下午4:41:22 [QWER] Public File Copied static\robots.txt
下午4:41:22 [QWER] Image File Copied src\generated\assets\quick-start\cover.jpg
下午4:41:22 [QWER] Assets File Copied src\generated\assets\avatar.png
下午4:41:22 [QWER] Public File Copied static\favicon.png
下午4:41:22 [QWER] Assets File Copied src\generated\assets\mobile-preview.png
下午4:41:22 [QWER] Assets File Copied src\generated\assets\qwer.webp
下午4:41:22 [QWER] Image File Copied src\generated\assets\example\example1.jpg
下午4:41:22 [QWER] Assets File Copied src\generated\assets\default_og_card.webp
下午4:41:22 [QWER] MD File Processed D:\Dev\playground\blog\my-blog\src\routes\quick-start\+page.svelte
下午4:41:22 [QWER] Assets File Copied src\generated\assets\mobile-preview.webp
下午4:41:22 [QWER] Image File Copied src\generated\assets\hello-QWER\reach.jpg
下午4:41:22 [QWER] Assets File Copied src\generated\assets\preview.webp
下午4:41:22 [QWER] Image File Copied src\generated\assets\hello-QWER\wait.jpg
下午4:41:22 [QWER] Assets File Copied src\generated\assets\preview.png

> @kwchang0831/[email protected] dev:watch D:\Dev\playground\blog\my-blog
> npm-run-all -p -r dev:QWER dev:i18n dev:sveltekit


> @kwchang0831/[email protected] dev:QWER D:\Dev\playground\blog\my-blog
> node --no-warnings QWER watch


> @kwchang0831/[email protected] dev:sveltekit D:\Dev\playground\blog\my-blog
> cross-env MODE=development vite dev --host


> @kwchang0831/[email protected] dev:i18n D:\Dev\playground\blog\my-blog
> npx typesafe-i18n

下午4:41:28 [QWER] [Public] Folder - Init Scan Completed.
下午4:41:28 [QWER] [DATA] Folder - Init. Scan Completed.
下午4:41:28 [QWER] Meta File Loaded src/generated/posts.json
下午4:41:28 [QWER] Meta File Loaded src/generated/assets.json
▲ [WARNING] Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json]

    tsconfig.json:2:13:
      2 │   "extends": "./.svelte-kit/tsconfig.json",
        ╵              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[typesafe-i18n] version 5.24.2
[typesafe-i18n] generating files for TypeScript version: '4.9.x'
[typesafe-i18n] options: { adapter: 'svelte', esmImports: true }
[typesafe-i18n] watcher started in: './src/i18n/'
[typesafe-i18n] ERROR: in 'en'
Make sure to import the type 'BaseTranslation' from the generated 'i18n-types.ts' file.
See the example in the official docs: https://github.com/ivanhofer/typesafe-i18n/tree/main/packages/generator#namespaces

[typesafe-i18n] generated file: './src/i18n/i18n-types.ts'
[typesafe-i18n] generated file: './src/i18n/i18n-util'
[typesafe-i18n] generated file: './src/i18n/i18n-util.sync'
[typesafe-i18n] generated file: './src/i18n/i18n-svelte'
[typesafe-i18n] generated file: './src/i18n/i18n-util.async'
[typesafe-i18n] ... all files are up to date

Forced re-optimization of dependencies

  VITE v4.1.4  ready in 13568 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: http://192.168.56.1:5173/
  ➜  Network: http://192.168.1.101:5173/
  ➜  press h to show help

下午4:42:22 [vite-plugin-svelte] ssr compile in progress ...
下午4:42:33 [vite-plugin-svelte] ssr compile done.
package                         files    time      avg
@kwchang0831/svelte-qwer           23   0.88s   38.3ms
下午4:42:38 [vite] ✨ new dependencies optimized: nprogress, @builder.io/partytown/integration
下午4:42:38 [vite] ✨ optimized dependencies changed. reloading
下午4:42:40 [vite-plugin-svelte] ssr compile done.
package                         files    time     avg
@kwchang0831/svelte-qwer            1   8.8ms   8.8ms
下午4:42:42 [vite-plugin-svelte] ssr compile in progress ...
下午4:42:43 [vite-plugin-svelte] ssr compile done.
package                         files    time      avg
@kwchang0831/svelte-qwer           14   0.18s   12.6ms
下午4:42:47 [vite] ✨ new dependencies optimized: flexsearch/dist/module/index.js, lz-string
下午4:42:55 [vite] ✨ new dependencies optimized: medium-zoom
下午4:43:14 [vite-plugin-svelte] ssr compile in progress ...
下午4:43:18 [vite-plugin-svelte] ssr compile done.
package                         files    time      avg
@kwchang0831/svelte-qwer           20   0.64s   31.9ms
下午5:03:07 [vite] Internal server error: Failed to load url /example (resolved id: /example). This file is in /public and will be copied as-is during build without going through the plugin transforms, and therefore should not be imported from source code. It can only be referenced via HTML tags.
      at loadAndTransform (file:///D:/Dev/playground/blog/my-blog/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-ca21228b.js:39470:21)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

System Info

Ding@vac  D:\Dev\playground\blog\my-blog  npx envinfo --system --binaries --browsers --npmPackages "{svelte,@sveltejs/*,vite,@kwchang0831}"
Need to install the following packages:
  [email protected]
Ok to proceed? (y) y

  System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz     
    Memory: 6.57 GB / 15.87 GB
  Binaries:
    Node: 18.15.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.6.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (111.0.1661.54)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @sveltejs/adapter-netlify: 2.0.6 => 2.0.6
    @sveltejs/adapter-node: 1.2.2 => 1.2.2
    @sveltejs/adapter-static: 2.0.1 => 2.0.1
    @sveltejs/adapter-vercel: 2.3.1 => 2.3.1
    @sveltejs/kit: 1.11.0 => 1.11.0
    svelte: ^3.56.0 => 3.56.0
    vite: ^4.1.4 => 4.1.4

Additional Information

No response

Doesn't work on iPhone 5s

Describe the bug

I have an iPhone 5s and can't access this site. Every time I see "Loading post"

I think it's a problem with js and QWER library.

You can check?

Reproduction

iPhone 5s
v. 12.5.6
Browser: Chrome\Safari

Logs

There is not

System Info

There is not

Additional Information

photo_2023-04-14_22-06-53

Tag filter not working

Describe the bug

The tag filtering function in the header menu does not work properly.
Not only tags, but also narrowing down by years of posting and language.
(On the other hand, the tag search function works fine)

Reproduction

  1. Execute "pnpm i"
  2. Execute "pnpm husky"
  3. Execute "pnpm dev"
  4. Access the following URL from browser
    http://localhost:5173/
  5. Run tag filter in header menu

Logs

■ Filter cases by Tag
=====
Uncaught TypeError: Cannot read properties of undefined (reading 'find')
    at posts.ts:42:27
    at Array.filter (<anonymous>)
    at posts.ts:41:25
    at Set.forEach (<anonymous>)
    at posts.ts:40:11
    at Map.forEach (<anonymous>)
    at _filterByTags (posts.ts:38:18)
    at Object._filter [as filter] (posts.ts:75:13)
    at HTMLButtonElement.handleClick (tag.svelte?t=1664925776169:173:13)
=====

■ Filter cases by year and language
=====
Uncaught TypeError: Cannot read properties of undefined (reading 'find')
    at posts.ts:58:27
    at Array.filter (<anonymous>)
    at posts.ts:57:25
    at Set.forEach (<anonymous>)
    at posts.ts:56:11
    at Map.forEach (<anonymous>)
    at _filterByTags (posts.ts:38:18)
    at Object._filter [as filter] (posts.ts:75:13)
    at HTMLButtonElement.handleClick (tag.svelte:173:13)
=====

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (12) x64 AMD Ryzen 5 1600 Six-Core Processor
    Memory: 8.57 GB / 15.92 GB
  Binaries:
    Node: 16.17.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.18.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.53)    
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @sveltejs/adapter-auto: ^1.0.0-next.80 => 1.0.0-next.80      
    @sveltejs/adapter-node: ^1.0.0-next.96 => 1.0.0-next.96      
    @sveltejs/adapter-static: ^1.0.0-next.44 => 1.0.0-next.44    
    @sveltejs/kit: ^1.0.0-next.509 => 1.0.0-next.509 
    svelte: ^3.50.1 => 3.50.1
    vite: ^3.1.4 => 3.1.4

Additional Information

Enabled the following settings, and url or content, tags contain non-ascii character.

user\config\QWER.config.js

RoutingRules: {
    PostsYearMonthDate: true,
},

Shared images in .md

Describe the bug

if I have shared pictures that are not in the blog/article-folder, but in the users/assets/providers/* folder

if I add them to .md file they only work in dev mode, how can i make them work in production?

example path to shared files
src="/user/assets/providers/soft/logo.png etc

p.s I don't want to do that like

import Logo from '$assets/providers/payments/logo.png';

Reproduction

  • add path to images to .md file from assets folder
  • run a production build
  • make sure you don't have shared pictures

Logs

-

System Info

-

Additional Information

image

Colde Block highlight not work for python

I created a demo post, and write:

/// title: example.py
/// showLineNumber
for i in range(10):
    print(i)

But it only has black-white color, different with your demo(typescript-helloworld.ts)
I noticed that only defined the code parser of language-typescript and language-javascript (QWER-mdify-parser)
For other users, i think code block highlight for other language is necessary.
As a frond-end novice, i tried put highlight.js into app.html, but it not works. Is there any other better way to use highlight.js

Share not working from images other than jpg

Describe the bug

If I insert any image into the index.md, except for the jpg format, then when I share it on social networks, it is not displayed, instead the main image of the site is displayed instead

I tried such formats: webp, png, svg (works very bad)

Reproduction

JPG works fine
image
https://svelte-qwer-sigma.vercel.app/hello-QWER


Any other format loads the main image
image
https://svelte-qwer-korzh875.vercel.app/hello-QWER

But now image is
image


Replace the image with png svg or webr, deploy, clear the cache (!!!) in versal and browser and share it on any social network, the image will not match the one specified in the document

Logs

No response

System Info

vercel, pnnpm.

Additional Information

No response

How to change lang dynamically

How do I change lang dynamically?
Is it possible to add a language menu in the page so that the user can choose the language he wants?

inquiry: ECMAScript escape error and missing assets files

Hi! This case is a question. Possibly it could be a bug.
Please lend me your help.

First, if you run this template in its default state under a local Windows environment, you will get the following error.

  • Error log contents (some parts are omitted)
PS C:\Git\qwer> npm run dev

> @kwchang0831/svelte-qwer@0.3.3 dev 
> npm-run-all -s build:QWER dev:watch

> @kwchang0831/svelte-qwer@0.3.3 build:QWER
> node --no-warnings QWER build

> @kwchang0831/svelte-qwer@0.3.3 dev:watch
> npm-run-all -p -r dev:QWER dev:i18n dev:sveltekit

> @kwchang0831/svelte-qwer@0.3.3 dev:QWER
> node --no-warnings QWER watch

> @kwchang0831/svelte-qwer@0.3.3 dev:i18n
> npx typesafe-i18n

> @kwchang0831/svelte-qwer@0.3.3 dev:sveltekit
> cross-env MODE=development vite dev --host

  VITE v3.1.1  ready in 1753 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: http://192.168.11.103:5173/

Transform failed with 1 error:
C:/Git/qwer/src/generated/assets.ts:89:8: ERROR: Legacy octal escape sequences cannot be used in an ECMAScript module
Transform failed with 1 error:
C:/Git/qwer/src/generated/assets.ts:89:8: ERROR: Legacy octal escape sequences cannot be used in an ECMAScript module

Legacy octal escape sequences cannot be used in an ECMAScript module
87 |  export const assets = (() => {
88 |    const _data = new Map<string, Asset.Image>([
89 |      ['C:\404.webp', { 800: ASSETS_0, 1280: ASSETS_1, original: ASSETS_2, banner: ASSETS_3, extraFormats: ASSETS_4 }],
   |          ^
90 |      ['C:avatar.png', { 800: ASSETS_5, 1280: ASSETS_6, original: ASSETS_7, banner: ASSETS_8, extraFormats: ASSETS_9 }],
91 |      [

Error: Transform failed with 1 error:
C:/Git/qwer/src/generated/assets.ts:89:8: ERROR: Legacy octal escape sequences cannot be used in an ECMAScript module
    at failureErrorWithLog (C:\Git\qwer\node_modules\.pnpm\esbuild@0.15.7\node_modules\esbuild\lib\main.js:1624:15)
    at C:\Git\qwer\node_modules\.pnpm\esbuild@0.15.7\node_modules\esbuild\lib\main.js:1413:29
    at C:\Git\qwer\node_modules\.pnpm\esbuild@0.15.7\node_modules\esbuild\lib\main.js:678:9
    at handleIncomingPacket (C:\Git\qwer\node_modules\.pnpm\esbuild@0.15.7\node_modules\esbuild\lib\main.js:775:9)
    at Socket.readFromStdout (C:\Git\qwer\node_modules\.pnpm\esbuild@0.15.7\node_modules\esbuild\lib\main.js:644:7)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

I was able to resolve the above error with a manual patch, but the following error occurred subsequently.

It is still possible that I do not fully understand sveltekit and typescript, in which case I apologize, but when I run this template here in my Windows local environment, I get the following error and cannot build it.

  • Error log contents (some parts are omitted)
PS C:\Git\qwer> npm run dev

> @kwchang0831/svelte-qwer@0.3.3 dev 
> npm-run-all -s build:QWER dev:watch

> @kwchang0831/svelte-qwer@0.3.3 build:QWER
> node --no-warnings QWER build

> @kwchang0831/svelte-qwer@0.3.3 dev:watch
> npm-run-all -p -r dev:QWER dev:i18n dev:sveltekit

> @kwchang0831/svelte-qwer@0.3.3 dev:i18n
> npx typesafe-i18n

> @kwchang0831/svelte-qwer@0.3.3 dev:sveltekit
> cross-env MODE=development vite dev --host

> @kwchang0831/svelte-qwer@0.3.3 dev:QWER
> node --no-warnings QWER watch

  VITE v3.1.1  ready in 2171 ms

Input file is missing: /src/generated/assetsC:avatar.png
Input file is missing: /src/generated/assetsC:avatar.png (x2)
Input file is missing: /src/generated/assetsC:avatar.png (x3)
Input file is missing: /src/generated/assetsC:avatar.png (x4)
Input file is missing: /src/generated/assetsC:default_og_card.webp
Input file is missing: /src/generated/assetsC:default_og_card.webp (x2)
Input file is missing: /src/generated/assetsC:default_og_card.webp (x3)
Input file is missing: /src/generated/assetsC:default_og_card.webp (x4)
Input file is missing: /src/generated/assetsC:mobile-preview.png
Input file is missing: /src/generated/assetsC:mobile-preview.png (x2)
Input file is missing: /src/generated/assetsC:mobile-preview.png (x3)
Input file is missing: /src/generated/assetsC:mobile-preview.png (x4)
Input file is missing: /src/generated/assetsC:mobile-preview.webp
Input file is missing: /src/generated/assetsC:mobile-preview.webp (x2)
Input file is missing: /src/generated/assetsC:mobile-preview.webp (x3)
Input file is missing: /src/generated/assetsC:mobile-preview.webp (x4)
Input file is missing: /src/generated/assetsC:notfound-404.webp
Input file is missing: /src/generated/assetsC:notfound-404.webp (x2)
Input file is missing: /src/generated/assetsC:notfound-404.webp (x3)
Input file is missing: /src/generated/assetsC:notfound-404.webp (x4)
Input file is missing: /src/generated/assetsC:preview.png
Input file is missing: /src/generated/assetsC:preview.png (x2)
Input file is missing: /src/generated/assetsC:preview.png (x3)
Input file is missing: /src/generated/assetsC:preview.png (x4)
Input file is missing: /src/generated/assetsC:preview.webp
Input file is missing: /src/generated/assetsC:preview.webp (x2)
Input file is missing: /src/generated/assetsC:preview.webp (x3)
Input file is missing: /src/generated/assetsC:preview.webp (x4)
Input file is missing: /src/generated/assetsC:qwer.webp
Input file is missing: /src/generated/assetsC:qwer.webp (x2)
Input file is missing: /src/generated/assetsC:qwer.webp (x3)
Input file is missing: /src/generated/assetsC:qwer.webp (x4)
Input file is missing: /src/generated/assetsC:examplecover.jpg
Input file is missing: /src/generated/assetsC:examplecover.jpg (x2)
Input file is missing: /src/generated/assetsC:examplecover.jpg (x3)
Input file is missing: /src/generated/assetsC:examplecover.jpg (x4)
Input file is missing: /src/generated/assetsC:exampleexample1.jpg
Input file is missing: /src/generated/assetsC:exampleexample1.jpg (x2)
Input file is missing: /src/generated/assetsC:exampleexample1.jpg (x3)
Input file is missing: /src/generated/assetsC:exampleexample1.jpg (x4)
Input file is missing: /src/generated/assetsC:hello-QWERcover.jpg
Input file is missing: /src/generated/assetsC:hello-QWERcover.jpg (x2)
Input file is missing: /src/generated/assetsC:hello-QWERcover.jpg (x3)
Input file is missing: /src/generated/assetsC:hello-QWERcover.jpg (x4)
Input file is missing: /src/generated/assetsC:hello-QWEReach.jpg
Input file is missing: /src/generated/assetsC:hello-QWEReach.jpg (x2)
Input file is missing: /src/generated/assetsC:hello-QWEReach.jpg (x3)
Input file is missing: /src/generated/assetsC:hello-QWEReach.jpg (x4)
Input file is missing: /src/generated/assetsC:hello-QWERwait.jpg
Input file is missing: /src/generated/assetsC:hello-QWERwait.jpg (x2)
Input file is missing: /src/generated/assetsC:hello-QWERwait.jpg (x3)
Input file is missing: /src/generated/assetsC:hello-QWERwait.jpg (x4)
Input file is missing: /src/generated/assetsC:hello-worldcover.jpg
Input file is missing: /src/generated/assetsC:hello-worldcover.jpg (x2)
Input file is missing: /src/generated/assetsC:hello-worldcover.jpg (x3)
Input file is missing: /src/generated/assetsC:hello-worldcover.jpg (x4)
Input file is missing: /src/generated/assetsC:intro-to-QWERcover.jpg
Input file is missing: /src/generated/assetsC:intro-to-QWERcover.jpg (x2)
Input file is missing: /src/generated/assetsC:intro-to-QWERcover.jpg (x3)
Input file is missing: /src/generated/assetsC:intro-to-QWERcover.jpg (x4)
Input file is missing: /src/generated/assetsC:quick-startcover.jpg
Input file is missing: /src/generated/assetsC:quick-startcover.jpg (x2)
Input file is missing: /src/generated/assetsC:quick-startcover.jpg (x3)
Input file is missing: /src/generated/assetsC:quick-startcover.jpg (x4)
Input file is missing: /src/generated/assetsC:avatar.png
Error: Input file is missing: /src/generated/assetsC:avatar.png
Input file is missing: /src/generated/assetsC:avatar.png       
Error: Input file is missing: /src/generated/assetsC:avatar.png
Input file is missing: /src/generated/assetsC:avatar.png
Error: Input file is missing: /src/generated/assetsC:avatar.png
Input file is missing: /src/generated/assetsC:avatar.png       
Error: Input file is missing: /src/generated/assetsC:avatar.png

I have added an adapter and confirmed that it builds and deploys correctly on Cloudflare pages.
Therefore, this is an issue only in the local environment.

< various Informations >

  • OS: Windows10 Pro 21H2
  • IDE: VSCode 1.71.2
  • Node: v16.17.0
  • NPM: 8.18.0
  • svelte-qwer: 0.3.3

※ I am using npm instead of pnpm because I am considering running on Cloudflare

🐛 BUG: asset URL Handling regarding site.url in preview mode

Describe the bug
Regarding ImageTool, Manifests, same origin policies and maybe partytown.
Some system is creating url for the images based on user/config/site.ts -> siteConfig.url parameter.
Running pnpm dev shows a couple of errors because is using the URL set in the config, although it should be using localhost/@imagetools...
If the default URL is used same origin police comes into work because the file is there since the default URL is the same as the demo deployed on vercel.
Finally, this is a little annoyance, if you pnpm build and preview those URLs points to the final URL that should be deployed but it's running also in localhost.
My workaround is to use localhost in the siteConfig.url

To Reproduce

  1. Change siteConfig.url parameter on user/config/site.ts to somedomain.com
  2. Run pnpm dev
  3. See errors in console regarding properties from the manifest

Environment (please complete the following information):

  • OS/Platform: [Windows/WSL]
  • Browser [Brave]
  • Versions

After upgrade, @sveltejs/kit postinstall will never finish

Describe the bug

When installing on Windows, the svelte-kit postInstall step hangs indefinitely, and will eventually run out of memory and crash.

Reproduction

No response

Logs

; pnpm i
Scope: all 2 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +880
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 880, reused 880, downloaded 0, added 0, done

node_modules/.pnpm/[email protected]/node_modules/sharp: Running install script, done in 521ms
node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected]/node_modules/svelte-preprocess: Running postinstall script, done in 19ms
node_modules/.pnpm/[email protected]/node_modules/esbuild: Running postinstall script, done in 200ms
node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/kit: Running postinstall script, failed in 12m 48.2s
.../node_modules/@sveltejs/kit postinstall$ node postinstall.js
└─ Failed in 12m 48.2s at C:\dev\qwrk\asdf.qwrk.dev\node_modules\.pnpm\@[email protected][email protected][email protected]\node_modules\@sveltejs\kit
`

System Info

System:
    OS: Windows 10 10.0.25290
    CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor
    Memory: 28.55 GB / 63.91 GB
  Binaries:
    Node: 20.4.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.4.1 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.6.6 - ~\AppData\Local\pnpm\pnpm.CMD
  Browsers:
    Chrome: 114.0.5735.199
    Edge: Spartan (44.25290.1010.0), Chromium (114.0.1823.43), ChromiumDev (116.0.1938.16)
    Internet Explorer: 11.0.25290.1000
  npmPackages:
    @sveltejs/adapter-netlify: 2.0.7 => 2.0.7
    @sveltejs/adapter-node: 1.2.4 => 1.2.4
    @sveltejs/adapter-static: 2.0.2 => 2.0.2
    @sveltejs/adapter-vercel: 3.0.1 => 3.0.1
    @sveltejs/kit: 1.20.5 => 1.20.5
    svelte: ^4.0.0 => 4.0.0
    vite: ^4.3.9 => 4.3.9
`


### Additional Information

_No response_

Search field is empty

Describe the bug

After reload search field is empty

and do I understand correctly that the search looks for matches in all documents?

and if the word "example" is used in different documents, then the search will return several documents?
and do I understand correctly that the search looks for matches in all documents?

and if the word "example" is used in different documents, then the search will return several documents?

Reproduction

search.mp4

Logs

-

System Info

-

Additional Information

No response

image_zoom.svelte

Describe the bug

I've tried the command pnpm check and throwed this error, it has also other hints of unused components but those seem harmless. I don't think is really bad since it builds correctly but just letting you know.

Reproduction

pnpm check

Logs

/home/srg/code/sv3dlok/src/lib/components/image_zoom.svelte:60:68
Error: Object is possibly 'undefined'. (ts)
              media={`(min-width: ${meta.minWidth})`}
              srcset={`${asset[res] && Array.isArray(asset[res]) ? asset[res][index] : asset[res]}`.replace(/^\./, '')}
              width={meta.width}


/home/srg/code/sv3dlok/src/lib/components/image_zoom.svelte:60:68
Error: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type 'string | number | string[]'.
  No index signature with a parameter of type 'number' was found on type 'string | number | string[]'. (ts)
              media={`(min-width: ${meta.minWidth})`}
              srcset={`${asset[res] && Array.isArray(asset[res]) ? asset[res][index] : asset[res]}`.replace(/^\./, '')}
              width={meta.width}

System Info

System:
    OS: Linux 5.15 Ubuntu 20.04.5 LTS (Focal Fossa)
    CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
    Memory: 13.08 GB / 15.58 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 19.3.0 - ~/.nvm/versions/node/v19.3.0/bin/node
    npm: 9.2.0 - ~/.nvm/versions/node/v19.3.0/bin/npm
  npmPackages:
    @sveltejs/adapter-netlify: 1.0.0 => 1.0.0
    @sveltejs/adapter-node: 1.0.0 => 1.0.0
    @sveltejs/adapter-static: 1.0.0 => 1.0.0
    @sveltejs/adapter-vercel: 1.0.0 => 1.0.0
    @sveltejs/kit: 1.0.1 => 1.0.1
    svelte: ^3.55.0 => 3.55.0
    vite: ^4.0.1 => 4.0.1

Additional Information

No response

Missing .env.example

I see there is a !.env.example in the .gitignore and also that a .env file is needed for the svelte.config.js adapter choice.
Since I wanted to use the static adapter I guess I'm ok since it's the default

Text from Markdown on the main page

Hello. Thanks for your work.

I want to add text from the markdown template on the main page, how can I do that?

I tried to parse, but somehow it turns out difficult and then there are problems with styles

Could you provide an example?

Screenshot 2023-04-15 230731

Meaning markup, tables, formatting, structure

inqury: Build failure due to bloated script file

What measures can be considered to reduce the chunk size?
When trying to build/deploy the materials, the following warnings and errors will occur and the build will fail.

The hosting service used is Cloudflare pages.

(!) Some chunks are larger than 500 KiB after minification. Consider:
 - Using dynamic import() to code-split the application
 - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks
 - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
Error: Failed to publish your Function. Got error: Your Functions script is over the 1 MiB size limit (workers.api.error.script_too_large)

I'm guessing some modification is needed to the worker script.

■Build Command
npm run build
(npm-run-all -s build:QWER build:i18n build:sveltekit)

■System info (Cloudflare pages build environment)
node v16.17.1
NPM 8.15.0

Img Size

Describe the bug

Prod:
image
image

Dev:
image
image

Reproduction

If you use logotypes in png or svg format in dev mode, then everything works as expected

But if you run a prod assembly, then the svg become larger, and the png lose quality

Logs

-

System Info

-

Additional Information

No response

🐛 BUG: 安装出问题

系统

Mac os
node版本: 16.17.1

无法安装运行成功,提示错误

$: 执行:pnpm i                                         
Scope: all 2 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +814
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Packages are copied from the content-addressable store to the virtual store.
  Content-addressable store is at: /Users/mac/Library/pnpm/store/v3
  Virtual store is at:             node_modules/.pnpm
Progress: resolved 814, reused 814, downloaded 0, added 814, done
node_modules/.pnpm/[email protected]/node_modules/sharp: Running install script, failed in 43.4s
.../[email protected]/node_modules/sharp install$ (node install/libvips && node ins
│ sharp: Using cached /Users/mac/.npm/_libvips/libvips-8.13.1-darwin-x64.tar.b
│ sharp: Integrity check passed for darwin-x64
│ prebuild-install warn install Request timed out
│ gyp info it worked if it ends with ok
│ gyp info using [email protected]
│ gyp info using [email protected] | darwin | x64
│ gyp info find Python using Python version 3.9.10 found at "/usr/local/opt/py
│ gyp info spawn /usr/local/opt/[email protected]/bin/python3.9
│ gyp info spawn args [
│ gyp info spawn args   '/Users/mac/.nvm/versions/node/v16.17.1/lib/node_modul
│ gyp info spawn args   'binding.gyp',
│ gyp info spawn args   '-f',
│ gyp info spawn args   'make',
│ gyp info spawn args   '-I',
│ gyp info spawn args   '/Users/mac/my-blog/node_modules/.pnpm/[email protected]/no
│ gyp info spawn args   '-I',
│ gyp info spawn args   '/Users/mac/.nvm/versions/node/v16.17.1/lib/node_modul
│ gyp info spawn args   '-I',
│ gyp info spawn args   '/Users/mac/Library/Caches/node-gyp/16.17.1/include/no
│ gyp info spawn args   '-Dlibrary=shared_library',
│ gyp info spawn args   '-Dvisibility=default',
│ gyp info spawn args   '-Dnode_root_dir=/Users/mac/Library/Caches/node-gyp/16
│ gyp info spawn args   '-Dnode_gyp_dir=/Users/mac/.nvm/versions/node/v16.17.1
│ gyp info spawn args   '-Dnode_lib_file=/Users/mac/Library/Caches/node-gyp/16
│ gyp info spawn args   '-Dmodule_root_dir=/Users/mac/my-blog/node_modules/.pn
│ gyp info spawn args   '-Dnode_engine=v8',
│ gyp info spawn args   '--depth=.',
│ gyp info spawn args   '--no-parallel',
│ gyp info spawn args   '--generator-output',
│ gyp info spawn args   'build',
│ gyp info spawn args   '-Goutput_dir=.'
│ gyp info spawn args ]
│ gyp info spawn make
│ gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
│   CC(target) Release/obj.target/nothing/../../../[email protected]/node_m
│   LIBTOOL-STATIC Release/nothing.a
│ warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive librar
│   TOUCH Release/obj.target/libvips-cpp.stamp
│   CXX(target) Release/obj.target/sharp-darwin-x64/src/common.o
│ ../src/common.cc:24:10: fatal error: 'vips/vips8' file not found
│ #include <vips/vips8>
│          ^~~~~~~~~~~~
│ 1 error generated.
│ make: *** [Release/obj.target/sharp-darwin-x64/src/common.o] Error 1
│ gyp ERR! build error 
│ gyp ERR! stack Error: `make` failed with exit code: 2
│ gyp ERR! stack     at ChildProcess.onExit (/Users/mac/.nvm/versions/node/v16
│ gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
│ gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/chi
│ gyp ERR! System Darwin 19.6.0
│ gyp ERR! command "/Users/mac/.nvm/versions/node/v16.17.1/bin/node" "/Users/m
│ gyp ERR! cwd /Users/mac/my-blog/node_modules/.pnpm/[email protected]/node_modules
│ gyp ERR! node -v v16.17.1
│ gyp ERR! node-gyp -v v9.1.0
│ gyp ERR! not ok 
└─ Failed in 43.4s
 ELIFECYCLE  Command failed with exit code 1.

Found an error using the template

Describe the bug

This bug doesn't break the website nor the construction of it.

Reproduction

Create a project with the template

Go to Github and create a project using this repo as a template

pnpm dev

Run a development server and enter in any article

go to the end of the article

After the recommendations you will see a text saying An error occurred: giscus is not installed on this repository

Screenshot 2023-11-04 at 15 17 35

Logs

No relevant logs found

System Info

System:
    OS: macOS 14.0
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Memory: 316.76 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.7.0 - ~/.nvm/versions/node/v20.7.0/bin/node
    npm: 10.1.0 - ~/.nvm/versions/node/v20.7.0/bin/npm
    pnpm: 8.8.0 - ~/.nvm/versions/node/v16.20.2/bin/pnpm
    bun: 1.0.3 - ~/.bun/bin/bun
    Watchman: 2023.10.09.00 - /usr/local/bin/watchman
  Browsers:
    Chrome: 119.0.6045.105
    Safari: 17.0
  npmPackages:
    @sveltejs/adapter-cloudflare: ^2.3.3 => 2.3.3 
    @sveltejs/adapter-netlify: 2.0.8 => 2.0.8 
    @sveltejs/adapter-node: 1.3.1 => 1.3.1 
    @sveltejs/adapter-static: 2.0.3 => 2.0.3 
    @sveltejs/adapter-vercel: 3.0.3 => 3.0.3 
    @sveltejs/kit: 1.27.1 => 1.27.1 
    svelte: ^4.2.2 => 4.2.2 
    vite: ^4.5.0 => 4.5.0 

Browser: Firefox v 119.0

Additional Information

No response

build error due to PrismJS

Describe the bug

Attempt to build on MacOS fails.

Reproduction

No response

Logs

(base) michael@MichaelacStudio qwer % pnpm dev

> @kwchang0831/[email protected] dev /Users/michael/Documents/dev/qwer
> npm-run-all -s build:QWER dev:watch


> @kwchang0831/[email protected] build:QWER /Users/michael/Documents/dev/qwer
> node --no-warnings QWER build

/Users/michael/Documents/dev/qwer/node_modules/.pnpm/[email protected]/node_modules/prismjs/prism.js:345
					lang[key] = redef[key];
					          ^

TypeError: Cannot set properties of undefined (setting 'class-name')
    at Object.extend (/Users/michael/Documents/dev/qwer/node_modules/.pnpm/[email protected]/node_modules/prismjs/prism.js:345:16)
    at /Users/michael/Documents/dev/qwer/node_modules/.pnpm/[email protected]/node_modules/prismjs/components/prism-cpp.min.js:1:856
    at Object.<anonymous> (/Users/michael/Documents/dev/qwer/node_modules/.pnpm/[email protected]/node_modules/prismjs/components/prism-cpp.min.js:1:2589)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at cjsLoader (node:internal/modules/esm/translators:345:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:294:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)

Node.js v20.10.0
 ELIFECYCLE  Command failed with exit code 1.
ERROR: "build:QWER" exited with 1.
 ELIFECYCLE  Command failed with exit code 1.

System Info

System:
    OS: macOS 13.5
    CPU: (12) arm64 Apple M2 Max
    Memory: 145.84 MB / 96.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - /usr/local/bin/node
    Yarn: 1.22.21 - /usr/local/bin/yarn
    npm: 10.2.5 - /usr/local/bin/npm
    pnpm: 8.12.1 - /usr/local/bin/pnpm
  npmPackages:
    @sveltejs/adapter-cloudflare: ^2.3.3 => 2.3.3
    @sveltejs/adapter-netlify: 2.0.8 => 2.0.8
    @sveltejs/adapter-node: 1.3.1 => 1.3.1
    @sveltejs/adapter-static: 2.0.3 => 2.0.3
    @sveltejs/adapter-vercel: 3.0.3 => 3.0.3
    @sveltejs/kit: 1.27.3 => 1.27.3
    svelte: ^4.2.2 => 4.2.2
    vite: ^4.5.0 => 4.5.0

Additional Information

No response

Vite building error (ByteString convertion by undici)

After adding a total of 270 markdown files and performing a build, the generated "posts.js" was bloated and the type conversion of characters to bytestring format failed, causing an error, as shown in the log below.

> vite build

vite v3.1.3 building for production...
...(omission)...
transforming (4) node_modules\.pnpm\flexsearch@0.7.21\node_modules\flexsearch\dist\flexsearch.bUse of eval is strongly discouraged, as it poses security risks and may cause issues with minification   
✓ 8 modules transformed.
✓ 885 modules transformed.
[plugin:unocss:global:build:scan] [unocss] failed to find vite:css-post plugin. It might be an internal bug of UnoCSS
rendering chunks (563)...The emitted file "vite-manifest.json" overwrites a previously emitted file 
of the same name.
vite v3.1.3 building SSR bundle for production...
...(omission)...
✓ 3 modules transformed.
No name was provided for external module 'flexsearch' in output.globals – guessing 'flexsearch'
No name was provided for external module 'lz-string' in output.globals – guessing 'LZString'441 modules transformed.
[plugin:unocss:global:build:scan] [unocss] failed to find vite:css-post plugin. It might be an internal bug of UnoCSS
.svelte-kit/output/server/vite-manifest.json
                                                  96.70 KiB
.svelte-kit/output/server/index.js
                                                  84.82 KiB
.svelte-kit/output/server/entries/endpoints/atom.xml/_server.ts.js
                                                  2.96 KiB
.svelte-kit/output/server/entries/endpoints/feed.json/_server.ts.js
                                                  1.96 KiB
.svelte-kit/output/server/entries/endpoints/manifest.webmanifest/_server.ts.js
                                                  2.17 KiB
.svelte-kit/output/server/entries/endpoints/sitemap.xml/_server.ts.js
                                                  0.89 KiB
.svelte-kit/output/server/entries/endpoints/versions.json/_server.ts.js
                                                  5.38 KiB
.svelte-kit/output/server/entries/pages/_layout.svelte.js
                                                  22.15 KiB
.svelte-kit/output/server/entries/pages/_layout.ts.js
                                                  0.15 KiB
.svelte-kit/output/server/entries/pages/_error.svelte.js
                                                  1.43 KiB
.svelte-kit/output/server/entries/pages/_page.svelte.js
                                                  13.17 KiB
.svelte-kit/output/server/entries/pages/about/_page.svelte.js
                                                  7.38 KiB
...(omission)...
.svelte-kit/output/server/chunks/index.js
                                                  4.47 KiB
.svelte-kit/output/server/chunks/index2.js
                                                  1.29 KiB
.svelte-kit/output/server/chunks/site.js
                                                  2.87 KiB
.svelte-kit/output/server/chunks/tags.js
                                                  3.81 KiB
.svelte-kit/output/server/chunks/themes.js
                                                  0.78 KiB
.svelte-kit/output/server/chunks/i18n-svelte.js
                                                  1.58 KiB
.svelte-kit/output/server/chunks/image_avatar.svelte_svelte_type_style_lang.js
                                                  6.41 KiB
.svelte-kit/output/server/chunks/image_avatar.js
                                                  0.98 KiB
.svelte-kit/output/server/chunks/assets.js
                                                  3.54 KiB
.svelte-kit/output/server/chunks/post.js
                                                  11.39 KiB
.svelte-kit/output/server/chunks/image_zoom.js
                                                  3.91 KiB
.svelte-kit/output/server/chunks/emoji.js
                                                  0.76 KiB
.svelte-kit/output/server/chunks/gallery.js
                                                  0.80 KiB
.svelte-kit/output/server/chunks/code_copy.js
                                                  0.35 KiB
.svelte-kit/output/server/chunks/info_box.js
                                                  1.68 KiB
.svelte-kit/output/server/chunks/google_map.js
                                                  0.70 KiB
.svelte-kit/output/server/chunks/blog_card.js
                                                  1.35 KiB
.svelte-kit/output/server/chunks/hooks.server.js
                                                  0.24 KiB
.svelte-kit/output/server/chunks/posts.js
                                                  1662.91 KiB
TypeError: Cannot convert argument to a ByteString because the character atindex 20 has a value of 9834 which is greater than 255.
    at Object.webidl.converters.ByteString (C:\Git\qwer\node_modules\.pnpm\undici@5.10.0\node_modules\undici\lib\fetch\webidl.js:403:13)
    at Headers.set (C:\Git\qwer\node_modules\.pnpm\undici@5.10.0\node_modules\undici\lib\fetch\headers.js:362:31)
    at file:///C:/Git/qwer/.svelte-kit/output/server/index.js:2573:29  
    at async Object.handle (file:///C:/Git/qwer/.svelte-kit/output/server/chunks/hooks.server.js:2:46)
    at async respond (file:///C:/Git/qwer/.svelte-kit/output/server/index.js:2562:22)
    at async visit (file:///C:/Git/qwer/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.503_svelte@3.50.1+vite@3.1.3/node_modules/@sveltejs/kit/src/core/prerender/prerender.js:226:20)
file:///C:/Git/qwer/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.503_svelte@3.50.1+vite@3.1.3/node_modules/@sveltejs/kit/src/core/prerender/prerender.js:50
                                throw new Error(format_error(details, config));
                                      ^

Is it possible that this is a specification limitation on this theme side?
Alternatively, could it be a problem with sveltekit?
※I don't know where the library "undici" is used.

Jerky animation

Describe the bug

Phantom jumps (animation) when you first go to a post or when the Internet is weak

Reproduction

Windows 11
Chrome 112.05
Desctop\Mobile version

Logs

There is not

System Info

There is not

Additional Information

  • Here I'm trying to show how loading a post for the first time or when the Internet is weak (this becomes not obvious)
QWER.-.Google.Chrome.2023-04-14.22-34-11.mp4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.