Skip to content

SPA Cannot access assets on power pages #41

@ArneBAR1

Description

@ArneBAR1

Describe the bug
I uploaded my spa site using pac pages upload-code-site, and the upload completed without any issues. However, when I visited the site, it couldn't locate my CSS or JS files.

Despite this, I can clearly see the files in the Web Files section of the admin center. Additionally, when I try to access the files directly using their URL paths, the browser displays the following message:

"This is a marker file generated by the precompilation tool, and should not be deleted!"

However, when I download the files from Web Files section of the admin center, they contain the correct content.

To Reproduce
Steps to reproduce the behavior:

  1. pac pages upload-code-site --rootPath "../mySite" --compiledPath "dist" --siteName "My Awesome Site"
  2. Activate site in power pages
  3. Go to the power page site by the url
  4. See the error in the dev tool console

Expected behavior
After uploading and activating the site, it should run without any issues and correctly load all referenced JS and CSS files.

Screenshots
Image

Image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Edge
  • Version 141.0.3537.57

Additional context
Documentation I followed:
https://learn.microsoft.com/en-us/power-pages/configure/create-code-sites

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions