Skip to content

exceeded the maximum number of routes (99) allowed in AppEngine app.yaml #174

@haewoniee

Description

@haewoniee

I have a sveltekit project where I have a multiple images, css files, and fonts under /static folder.

When I build with sveltekit-adapter-appengine, I get this message:


  You've exceeded the maximum number of routes (99) allowed in AppEngine app.yaml, and you have 113 routes.
  This often happens when you have a lot of static assets.
  If possible, use vites asset importing instead: https://kit.svelte.dev/docs/assets

Now when I look at the build/app.yaml file, each file's route is generated, causing the above error, such as:

  - url: /img/icon/brand-a.svg
    static_files: storage/img/icon/brand-a.svg
    upload: storage/img/icon/brand-a.svg
    secure: always
  - url: /img/icon/brand-b.svg
    static_files: storage/img/icon/brand-b.svg
    upload: storage/img/icon/brand-b.svg
    secure: always

Is there any way to get away with this error other than moving the static folder under /src such as generating the app.yaml file maybe just like below? (fix me if my syntaxes are wrong)

    - url: /css/(.*\.(css))
      static_files: storage/css/\1
      upload: storage/css/(.*\.(css))
      secure: always
    - url: /img/(.+/)?([^/]+)
      static_files: storage/img/\1\2
      upload: storage/img/(.+/)?([^/]+)
      secure: always

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions