mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
"dotnet publish" strips out angular-specific tags used for CSS #93
Closed
opened 2025-08-09 17:14:58 +00:00 by fergalmoran
·
0 comments
No Branch/Tag Specified
master
rybrande/masterToSrc
pakrym/no-console-fb
release/2.2
pakrym/remove-obsole-api-usage
maestro/release/2.2
maestro/master
release/2.1
release/2.0
rybrande/MergeRelease21IntoDev
rel/2.0.0-extensions
angular-animations-example
fix-angular-material-publishing
rel/2.0.0-templates
httpwithstatetransfer-example
rel/2.0.0-preview2-templates
aspnet-webpack-react-2.x
angular4-prerender-data-example
version-1.x
angular2-lazy-loading-example
581-isomorphic-react-cookies-example
example-using-typescript-paths-for-494
v1.0.x
angular2-materialize-example
redux-typed-1-x
primeng-example
font-awesome-example
karma-testing-example
2.2.0
2.2.0-preview3
2.2.0-preview2
2.2.0-preview1
2.1.1
2.1.0
2.0.4
2.1.0-rc1-final
2.1.0-preview2-final
2.0.3
2.1.0-preview1-final
2.0.2
2.0.1
rel/2.0.0
rel/2.0.0-preview2
Labels
Clear labels
2 - Working
2 - Working
3 - Done
3 - Done
3 - Done
3 - Done
3 - Done
3 - Done
3 - Done
angular
angular
angular
angular
angular
bug
bug
bug
bug
bug
bug
bug
bug
bug
core
core
core
core
core
core
core
duplicate
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
external
external
P1
P1
P1
P1
P1
P1
P2
P2
P2
P2
P2
P2
P2
P2
P2
PRI: 1 - Required
react
react
task
task
up-for-grabs
up-for-grabs
up-for-grabs
waiting
waiting
waiting
waiting
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
fergalmoran
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github/JavaScriptServices#93
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sjetha-pason on 4/18/2018
Problem
When using "dotnet publish" to publish and the pack our project for deployment, the DOM-related tags in our Angular 4 project are stripped out. This affects some of our components that assume that the parent elements have styling, namely that they have their height set to 100%.
Build process that works:
C:\Dev\MPS\mps [RMS-5200 ↑5 +1 ~4 -0 !]> npm run-script build
Microsoft (R) Build Engine version 15.7.11.29948 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 66.74 ms for C:\Dev\MPS\mps\mps.csproj.
Restore completed in 70.16 ms for C:\Dev\MPS\mps\mps.csproj.
Restore completed in 124.07 ms for C:\Dev\MPS\mps\mps.csproj.
mps -> C:\Dev\MPS\mps\bin\Debug\netcoreapp2.0\mps.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:03.17
Hash: 9aa766adcb359798b0c94a20433964185280358e
Version: webpack 2.7.0
Child
Hash: 9aa766adcb359798b0c9
Time: 6313ms
Asset Size Chunks Chunk Names
89889688147bd7575d6327160d64e760.svg 109 kB [emitted]
vendor.js 3.33 MB 0 [emitted] [big] vendor
vendor.css 406 kB 0 [emitted] [big] vendor
Child
Hash: 4a20433964185280358e
Time: 6294ms
Asset Size Chunks Chunk Names
89889688147bd7575d6327160d64e760.svg 109 kB [emitted]
vendor.js 3.6 MB 0 [emitted] [big] vendor
Hash: 729bea1577a4663ba9ce957cdd3206cc36698112
Version: webpack 2.7.0
Child
Hash: 729bea1577a4663ba9ce
Time: 32732ms
Asset Size Chunks Chunk Names
main-client.js 2.16 MB 0 [emitted] [big] main-client
main-client.js.map 2.55 MB 0 [emitted] main-client
Child
Hash: 957cdd3206cc36698112
Time: 32723ms
Asset Size Chunks Chunk Names
main-server.js 6.66 MB 0 [emitted] [big] main-server
C:\Dev\MPS\mps [RMS-5200 ↑5 +1 ~4 -0 !]> dotnet run
Using launch settings from C:\Dev\MPS\mps\Properties\launchSettings.json...
Hosting environment: Production
Content root path: C:\Dev\MPS\mps
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
Note the _nghost and _ngcontent tags present in the source code below:

Build/publish process that doesn't work
C:\Dev\MPS\mps [RMS-5200 ↑5 +1 ~4 -0 !]> dotnet publish
Microsoft (R) Build Engine version 15.7.11.29948 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 75.6 ms for C:\Dev\MPS\mps\mps.csproj.
Restore completed in 81.61 ms for C:\Dev\MPS\mps\mps.csproj.
Restore completed in 130.46 ms for C:\Dev\MPS\mps\mps.csproj.
mps -> C:\Dev\MPS\mps\bin\Debug\netcoreapp2.0\mps.dll
up to date in 11.459s
Hash: b2a50760c2c3639f51b8c69736d35fa559760d6a
Version: webpack 2.7.0
Child
Hash: b2a50760c2c3639f51b8
Time: 25133ms
Asset Size Chunks Chunk Names
89889688147bd7575d6327160d64e760.svg 109 kB [emitted]
vendor.js 194 kB 0 [emitted] vendor
vendor.css 365 kB 0 [emitted] [big] vendor
Child
Hash: c69736d35fa559760d6a
Time: 25241ms
Asset Size Chunks Chunk Names
89889688147bd7575d6327160d64e760.svg 109 kB [emitted]
vendor.js 3.54 MB 0 [emitted] [big] vendor
Hash: d39aed335f5e65006542dc55b5d8250b61e440aa
Version: webpack 2.7.0
Child
Hash: d39aed335f5e65006542
Time: 37211ms
Asset Size Chunks Chunk Names
main-client.js 1.47 MB 0 [emitted] [big] main-client
Child
Hash: dc55b5d8250b61e440aa
Time: 37203ms
Asset Size Chunks Chunk Names
main-server.js 7.2 MB 0 [emitted] [big] main-server
mps -> C:\Dev\MPS\mps\bin\Debug\netcoreapp2.0\publish
C:\Dev\MPS\mps [RMS-5200 ↑5 +1 ~4 -0 !]> cd .\bin\Debug\netcoreapp2.0\publish
C:\Dev\MPS\mps\bin\Debug\netcoreapp2.0\publish [RMS-5200 ↑5 +1 ~4 -0 !]> dotnet .\mps.dll
Hosting environment: Production
Content root path: C:\Dev\MPS\mps\bin\Debug\netcoreapp2.0\publish
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
Note that the _ng tags are now missing from the source code:
