Skip to content
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

[wasm] Make WasmMainJSPath optional #63465

Closed
Tracked by #70762
pavelsavara opened this issue Jan 6, 2022 · 3 comments · Fixed by #81484
Closed
Tracked by #70762

[wasm] Make WasmMainJSPath optional #63465

pavelsavara opened this issue Jan 6, 2022 · 3 comments · Fixed by #81484
Assignees
Labels
arch-wasm WebAssembly architecture area-Build-mono
Milestone

Comments

@pavelsavara
Copy link
Member

pavelsavara commented Jan 6, 2022

There are use-cases when there is no main javaScript file.
For example with NextJs where we don't own application startup.

src\mono\wasm\build\WasmApp.targets

<Error Condition="'$(WasmMainJSPath)' == ''" Text="%24(WasmMainJSPath) property needs to be set" />

src\tasks\WasmAppBuilder\WasmAppBuilder.cs

if (!File.Exists(MainJS))
    throw new LogAsErrorException($"File MainJS='{MainJS}' doesn't exist.");
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-Build-mono labels Jan 6, 2022
@pavelsavara pavelsavara added this to the 7.0.0 milestone Jan 6, 2022
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jan 6, 2022
@ghost
Copy link

ghost commented Jan 6, 2022

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

There are use-cases when there is no main javaScript file.
For example with NextJs where we don't own application startup.

src\mono\wasm\build\WasmApp.targets

<Error Condition="'$(WasmMainJSPath)' == ''" Text="%24(WasmMainJSPath) property needs to be set" />

src\tasks\WasmAppBuilder\WasmAppBuilder.cs

if (!string.IsNullOrEmpty(MainJS) && !File.Exists(MainJS))
    throw new LogAsErrorException($"File MainJS='{MainJS}' doesn't exist.");
Author: pavelsavara
Assignees: -
Labels:

arch-wasm, area-Build-mono

Milestone: 7.0.0

@pavelsavara pavelsavara removed the untriaged New issue has not been triaged by the area owner label Jan 6, 2022
@pavelsavara pavelsavara modified the milestones: 7.0.0, 8.0.0 Aug 3, 2022
@pavelsavara
Copy link
Member Author

cc @radical @danroth27

@danroth27
Copy link
Member

I hit this as well when looking at using .NET from existing JS apps: #77191

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Feb 1, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Feb 27, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Mar 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants