{"id":17621483,"url":"https://github.com/sql-mistermagoo/blazorpreview_8_typescript_sample","last_synced_at":"2025-09-02T10:35:10.220Z","repository":{"id":91797719,"uuid":"202424489","full_name":"SQL-MisterMagoo/BlazorPreview_8_Typescript_Sample","owner":"SQL-MisterMagoo","description":"How to use Typescript in a Razor Component Library (and how it also doesn't work very well)","archived":false,"fork":false,"pushed_at":"2020-06-15T16:16:51.000Z","size":226,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T06:56:53.881Z","etag":null,"topics":["blazor","blazorlib","content-files","embedded-resource","staticwebassets","typescript"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SQL-MisterMagoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-14T20:53:59.000Z","updated_at":"2019-08-14T22:43:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"503dd072-6d28-46d0-8de2-d7617d38dff9","html_url":"https://github.com/SQL-MisterMagoo/BlazorPreview_8_Typescript_Sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SQL-MisterMagoo/BlazorPreview_8_Typescript_Sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SQL-MisterMagoo%2FBlazorPreview_8_Typescript_Sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SQL-MisterMagoo%2FBlazorPreview_8_Typescript_Sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SQL-MisterMagoo%2FBlazorPreview_8_Typescript_Sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SQL-MisterMagoo%2FBlazorPreview_8_Typescript_Sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SQL-MisterMagoo","download_url":"https://codeload.github.com/SQL-MisterMagoo/BlazorPreview_8_Typescript_Sample/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SQL-MisterMagoo%2FBlazorPreview_8_Typescript_Sample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273271739,"owners_count":25075966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blazor","blazorlib","content-files","embedded-resource","staticwebassets","typescript"],"created_at":"2024-10-22T20:43:36.549Z","updated_at":"2025-09-02T10:35:10.178Z","avatar_url":"https://github.com/SQL-MisterMagoo.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Blazor Preview 8 Broken Libraries\n\nBlazor Preview 8 sees the death of the \"blazorlib\" template, \nwhich was used for Comnponent Libraries in previous versions.\n\nThe new Razor Component Library is supposed to replace it, \nbut there are problems...\n\n### No Client Side Blazor support for \"content\"\n\nRCL does not provide support for \"content\" files in \nClient-Side Blazor.\n\nUsing the old _blazorlib_ template, any content files \n(JS/CSS etc) would automatically be packed as \nEmbedded Resources in the component assembly and\nserved up by the Blazor WASM web server.\n\nYou can still achieve this, by adding these lines into your \nRCL project file\n\n``` XML\n  \u003cItemGroup Label=\"Client Side Blazor\"\u003e\n    \u003c!-- .js/.css files will be referenced via \u003cscript\u003e/\u003clink\u003e tags; other content files will just be included in the app's 'dist' directory without any tags referencing them --\u003e\n    \u003cEmbeddedResource Include=\"content\\**\\*.js\" LogicalName=\"blazor:js:%(RecursiveDir)%(Filename)%(Extension)\" /\u003e\n    \u003cEmbeddedResource Include=\"content\\**\\*.css\" LogicalName=\"blazor:css:%(RecursiveDir)%(Filename)%(Extension)\" /\u003e\n    \u003cEmbeddedResource Include=\"content\\**\" Exclude=\"**\\*.js;**\\*.css\" LogicalName=\"blazor:file:%(RecursiveDir)%(Filename)%(Extension)\" /\u003e\n  \u003c/ItemGroup\u003e\n```\n\n### No Server-Side Content When Not In Development\n\nIf the environment variable `ASPNETCORE_ENVIRONMENT` is not\nset to `Development`, no content files are served by the SSB\nproject - whether published or not.\n\n## This repo contains sample projects to demonstrate these issues\n\nTo see the problem with SSB content files, change the environment\nvariable `ASPNETCORE_ENVIRONMENT` to anything other than \n`Development` and run it. Check the browser console and see the \nerror where it cannot load the `Library.js` file.\n\nTo see the problem in CSB, comment out the `ItemGroup` labelled \n*Client Side Blazor* in **BlazorCSB8.csproj** and run the BlazorCSB8 \nproject, then check the browser console for errors.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsql-mistermagoo%2Fblazorpreview_8_typescript_sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsql-mistermagoo%2Fblazorpreview_8_typescript_sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsql-mistermagoo%2Fblazorpreview_8_typescript_sample/lists"}