-
Notifications
You must be signed in to change notification settings - Fork 37
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
Missing Script Tag in Deployed Azure Build #139
Comments
Hi, I don't see the manifest file. Folders starting with a dot are ignored by default. Make sure you are including the <ItemGroup>
<!-- Without this line your manifest.json won't be copied on publish because dot folder/files are ignored by default -->
<Content Include="wwwroot\.vite\**" />
</ItemGroup> The manifest file is required, otherwise, the manifest service cannot locate the asset files. |
I have that in my csproj file Here is the project file: |
It's true. As I can see, if there are no files in the But for now, you can change the manifest name to avoid the dot folder and it should work. Example: // Program.cs
// Add the Vite services.
builder.Services.AddViteServices(options =>
{
options.Manifest = "vite-manifest.json"; // Here
options.Server.AutoRun = true;
options.Server.Https = true;
}); // vite.config.ts
const config: UserConfig = {
// ...
build: {
// ...
manifest: "vite-manifest.json", // Here
}
}; |
@Eptagone That did indeed work. Looks like there is a bug somewhere with the extra folder being generated I think. If the I had a similar issue with the https certs, and my fix for those was to make it so it only had one containing folder. |
Describe the bug

I managed to get a demo project deployed into a test enviornment using azure.
The HTML page shows up just fine, but the script and style links are missing.
If I but my IDE into release mode and change the environment to anything but development, it runs fine.
When I inspect the built files, I do see the css and javascript files in the wwwroot folder.
I am going to attach the .zip of the built demo project as well.
DotNetVite-4.zip
To Reproduce
DotNetVite-4.zip
fileExpected behavior

To see the below screen:
Current behavior

Device (please complete the following information):
The text was updated successfully, but these errors were encountered: