forked from BlazorExtensions/SignalR
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround for problem with blazor.extensions.signalr.js asset not lo…
…aded after update to 3.1.0-preview4.19579.2 (lead to error: Could not find 'BlazorExtensions' in 'window'. Error: Could not find 'BlazorExtensions' in 'window'). See BlazorExtensions#66 for more details.
- Loading branch information
Krzysztof Łaz
committed
Dec 12, 2019
1 parent
c72b906
commit ad29015
Showing
9 changed files
with
23 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"sdk": { | ||
"version": "3.1.100-preview3-014645" | ||
"version": "3.1.100" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/wwwroot/blazor.extensions.signalr.js |
16 changes: 10 additions & 6 deletions
16
src/Blazor.Extensions.SignalR.JS/Blazor.Extensions.SignalR.JS.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,36 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Library</OutputType> | ||
<IsPackable>false</IsPackable> | ||
<BlazorLinkOnBuild>false</BlazorLinkOnBuild> | ||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked> | ||
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion> | ||
<DefaultItemExcludes>${DefaultItemExcludes};dist\**;node_modules\**</DefaultItemExcludes> | ||
<DefaultItemExcludes>${DefaultItemExcludes};node_modules\**</DefaultItemExcludes> | ||
<NoWarn>CS2008</NoWarn> | ||
|
||
<!-- VS's FastUpToDateCheck doesn't consider .ts file changes, so it's necessary to disable it to get incremental builds to work correctly (albeit not as fast as if FastUpToDateCheck did work for them) --> | ||
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck> | ||
<TargetFramework>netstandard2.1</TargetFramework> | ||
<RazorLangVersion>3.0</RazorLangVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<WebpackInputs Include="**\*.ts" Exclude="dist\**;node_modules\**" /> | ||
<WebpackInputs Include="**\*.ts" Exclude="wwwroot\**;node_modules\**" /> | ||
</ItemGroup> | ||
|
||
<Target Name="EnsureNpmRestored" Condition="!Exists('node_modules')"> | ||
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." /> | ||
<Exec Command="npm install" /> | ||
</Target> | ||
|
||
<Target Name="RunWebpack" AfterTargets="ResolveReferences" Inputs="@(WebpackInputs)" Outputs="dist\blazor.extensions.signalr.js" DependsOnTargets="EnsureNpmRestored"> | ||
<RemoveDir Directories="dist" /> | ||
<Target Name="RunWebpack" AfterTargets="ResolveReferences" Inputs="@(WebpackInputs)" Outputs="wwwroot\blazor.extensions.signalr.js" DependsOnTargets="EnsureNpmRestored"> | ||
<RemoveDir Directories="wwwroot" /> | ||
<Exec Command="npm run build" /> | ||
<ItemGroup> | ||
<EmbeddedResource Include="dist\**\*.js" LogicalName="blazor:js:%(RecursiveDir)%(Filename)%(Extension)" /> | ||
<!-- | ||
<EmbeddedResource Include="wwwroot\**\*.js" LogicalName="blazor:js:%(RecursiveDir)%(Filename)%(Extension)" /> | ||
--> | ||
</ItemGroup> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters