-
Notifications
You must be signed in to change notification settings - Fork 7
dependency on compiler #9
Comments
I was just about to report the same issue. Here are some repro steps:
|
Hi folks, sorry for replying late I'll be checking the issue to generate a possible solution soon (upcoming holidays). |
@fulls1z3 Hi there! any update on this? I'm more than happy to take a crack on this if pointed in the right direction 👍 |
@dipunm @hermagrini I'm on it now 🤔 |
@dipunm @hermagrini well, I had a look on the source files, and confirmed that there's a direct dependency to import { PlatformState } from '@angular/platform-server';
...
constructor(@Inject(STATE_ID) private readonly stateId: string,
private readonly platformState: PlatformState,
...
const document: any = this.platformState.getDocument(); If someone has a better idea at this point, please don't hesitate to share with me. |
@theomathieubhvr as I mentioned you on fulls1z3/universal#43, this issue might also give you some hints. |
I just checked it out and had a look. I made some changes, but I have no idea how to test it. I installed karma, but it complains that there is no karma.config file in the config folder. Reckon I should do a PR anyway? |
@dipunm you can upload right here at the topic in a zip file |
Archive.zip |
any thoughts on the zip? |
@dipunm I'm working on a general update on all repos - it means a tremendous amount of issues will be resolved, and I'll analyze (highly probable implement) the changes in that zip file. |
I'm submitting a ... (check one with "x")
Current behavior
Add the following line into your AppModule
import { BrowserStateTransferModule } from '@ngx-universal/state-transfer';
Expected/desired behavior
This file imports the ServerStateTransferModule which in turn imports
@angular/platform-server
.Desired: The project should not be dependant on
@angular/platform-server
because of the above stepsMinimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
By importing the server platform, the client script grows from less than 800kb to 4mb. Also, the compiler is included even though the client script is aot compiled.
Please tell us about your environment:
Language: [all | TypeScript X.X | ES6/7 | ES5]
Node (for AoT issues):
node --version
= v7.8.0The text was updated successfully, but these errors were encountered: