Comments (4)
Is there any particular area you think you need to optimise? Compiling with aot changes the html until it is unrecognisable so I donβt know what you are targeting
from angular-meteor.
Once the app is build and deployed (not in development), all the HTML templates are imported as-is, see screenshot below:
This is how I build the meteor/angular app:
meteor build ../output --architecture os.linux.x86_64
and I deploy on a linux server.
Am I missing something?
Thanks.
EDIT:
Also to add, as per @ardatan comment in ##1895 AOT is the default in production, so I'm assuming AOT is also the default for built and deployed app. Right?
I did further testing on a staging server around AOT on the app running in development:
- Setting AOT=1 there is no .html files downloaded but instead dynamic-import fetch is used.
- Setting AOT=0 (or not adding it entirely) all the templates are downloaded .html (as-is) (same as the screenshot above).
The tests here seems fine to me, but I'm questioning AOT on a build/deployed app.
Meteor version: 1.8.2
Angular versions: 8.2.14
Angular compiler version: 0.3.4
Thanks
from angular-meteor.
I don't think you are building with AOT. Try this for your build command:
AOT=1 meteor build ../output --architecture os.linux.x86_64
Look in the build folder and you should not find any html files as they should all have been compiled by AOT to ngfactory.js files. They are unreadable by humans but browsers can read them much faster than having to compile angular for each component. The benefit is you angular app is much faster to load.
I'm pretty sure the compiler mentions that it does AOT stuff when it is turned on and it takes a lot longer than a normal build because of this. I can't remember as I'm using a modified version of the compiler with extra logging turned on.
from angular-meteor.
Looks like it did solve my problem. Thanks a lot.
I looked again here https://github.com/Urigo/angular-meteor/tree/master/atmosphere-packages/angular-compilers and it does mention that AOT mode is enabled by default as opposed to Three-shaking mode. Anyways I'm glad it's fixed.
from angular-meteor.
Related Issues (20)
- ReferenceError: angular is not defined
- Typescript compiler adds arrow function in web.browser.legacy js file causing error on IE11
- Angular Meteor Universal w/ AOT questions HOT 3
- Angular Meteor Universal w/ AOT config
- Problem when compiling project with MeteorCLI
- meteor build mobile app failed File to read not found or unreadable: HOT 1
- Infinite render loop for applications without a <base>
- Using angular-meteor with Meteor 1.8.2 HOT 3
- angular-meteor with Meteor 1.8.2 and ng-table
- upgrade to Meteor 1.9 fails HOT 19
- Error while compiling in AOT mode with Angular 9 HOT 15
- Client compiling twice every change/build HOT 2
- Upgrade to Meteor 1.10 fails HOT 2
- Bare example fails (with minor tweak) when upgraded to Meteor 1.8.2 HOT 2
- Server Side Rendering(SSR) in Angular CLI + Meteor project
- Testing your template :p
- Error: Cannot find module '/imports/app/app.module'
- `AOT=1 meteor` broken for Angular versions β₯ 13 HOT 3
- Are there any plans to upgrade this project to Angular 17?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-meteor.