-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Production build #41
Comments
Are you getting a specific error? I was able to run this it generates to dist/ Make sure you've got node > 4.1.0. |
No, i don't say it fails, i say it's not 'production'. Production build should contain .min lib files, no ts or sourcemaps and etc |
Prod builds (or any custom environment builds) are currently not supported. It's one of the many things that need to happen in order to make this project production ready. |
Looks like the /dist directory contains the exact copy of src directory including typescript files. I think the typescript files are not required in /dist. The /dist/vendor directory is clean, which has only the javascript files. |
In order to do the production build we can take the current build and:
What else? |
Assure that pre-compiled style (LESS/SASS) files are not copied to the dist directory |
Config files perhaps, with API addresses and 3rd party services tokens. |
I think this list looks good @cironunes. Will we also be minifying/mangling? Really, this production flow is the only thing missing for me to start using this hard right now. |
Picked this as the official production build issue to follow. |
For production build: - remove live reload references (still not 100%) - stop copying tests and .ts files + tsconfig.json Missing: - enableProdMode() - add a CNAME file Closes angular#41
For production build: - remove live reload references (still not 100%) - stop copying tests and .ts files + tsconfig.json Missing: - enableProdMode() - add a CNAME file Closes angular#41
For production build: - remove live reload references (still not 100%) - stop copying tests and .ts files + tsconfig.json Missing: - enableProdMode() - add a CNAME file Closes angular#41
For production build: - remove live reload references (still not 100%) - stop copying tests and .ts files + tsconfig.json Missing: - enableProdMode() - add a CNAME file Closes angular#41
For production build: - remove live reload references (still not 100%) - stop copying tests and .ts files + tsconfig.json Missing: - enableProdMode() - add a CNAME file Closes angular#41
For production build: - remove live reload references (still not 100%) - stop copying tests and .ts files + tsconfig.json Missing: - enableProdMode() - add a CNAME file Closes angular#41
For production build: - remove live reload references (still not 100%) - stop copying tests and .ts files + tsconfig.json Missing: - enableProdMode() - add a CNAME file Closes angular#41
Still missing:
|
So we are bundling now? That would be the best news I've heard all week. |
I'd love to continue working on that, but I just don't have the time at the moment :( |
@cironunes I added another item to the list:
|
You are talking about adding a |
I know still WIP here, but am I missing a flag for using the production vendor libs or is it just unfinished? I can only get |
That bit is the next one I'm working on, to be able to bundle stuff. |
Is there any way to add a custom environment by creating a file named for instance config/environment.stage.ts and then execute ng build --environment=stage ? It looks like it's defaulting to dev now. |
@cdarken no, it is not currently possible to have more environments other than dev and prod. It's one of my next action items though. I should mention though (since I haven't yet updated the readme), all builds using |
Thanks, I will wait patiently then. |
hello @filipesilva do we have an approximate timeline for this? I have a project that I will need to deploy to production soon, is there anything you recommend we should use until this is completed? |
@mashhoodr you can already do production builds, the thing that is missing is more than 2 environments. |
What about Service Workers? Thanks guys!!! |
Currently service workers are only enabled for mobile projects, but we're looking at having them in all prod builds. Images are not processed at the moment either. |
I think this issue is obsolete by now. All of the features mentioned so far have been addressed, with the possible exception of having service workers in all prod builds. That warrants discussion though so probably should be another issue. |
can anyone tell plz how to run angular cli production mode forever. i want to deploy production build on live server. But i am not getting it. |
Run |
Currently ng build --prod still generates source maps |
@neilhem is there an option to skip sourcemaps generation when building using |
Hey @Misiu, I'm using Still, I get too many files that I believe are unnecessary (but maybe they're not). Would be nice to have all the production deployment options such as: How to deploy gzipped version, how to deploy not gzipped version, with sourcemaps, without sourcemaps... This are all the files I get when I execute that command. Would appreciate a way to tidy up the production build, maybe include folders to separate files, such as 'js' & 'css'. I also would like to know if I can upload to my cloudfront the .gz without uploading the .js my angular-cli.json { |
Can anybody explain, Thanks :) |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
generate dist with dev versions of angular and systemjs, and my app files with .ts and source maps.
The text was updated successfully, but these errors were encountered: